(1.2ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0a572a7516606c4a72a92be006372a3c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:40.638146"], ["extension", "txt"], ["name", "Test"], ["token", "0a572a7516606c4a72a92be006372a3c"], ["updated_at", "2014-11-03 15:47:40.638146"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '36c48213f9c880d8c5a44e3a7e7d3853' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:40.642369"], ["extension", "txt"], ["name", "Test"], ["token", "36c48213f9c880d8c5a44e3a7e7d3853"], ["updated_at", "2014-11-03 15:47:40.642369"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '62a78759bdf0fbe6889acd9186783c2b' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:40.644512"], ["extension", "txt"], ["name", "Test"], ["token", "62a78759bdf0fbe6889acd9186783c2b"], ["updated_at", "2014-11-03 15:47:40.644512"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a411c5dc633af96e7e7d452887d45852' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:40.646512"], ["extension", "txt"], ["name", "Test"], ["token", "a411c5dc633af96e7e7d452887d45852"], ["updated_at", "2014-11-03 15:47:40.646512"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3b40fb1220d16ef6f66d36ba91270099' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:40.648534"], ["extension", "txt"], ["name", "Test"], ["token", "3b40fb1220d16ef6f66d36ba91270099"], ["updated_at", "2014-11-03 15:47:40.648534"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ae891f029cc8132065237603294079e4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:56.137238"], ["extension", "txt"], ["name", "Test"], ["token", "ae891f029cc8132065237603294079e4"], ["updated_at", "2014-11-03 15:47:56.137238"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a48782542b5af9960305ae2f31a68ebf' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:56.146560"], ["extension", "txt"], ["name", "Test"], ["token", "a48782542b5af9960305ae2f31a68ebf"], ["updated_at", "2014-11-03 15:47:56.146560"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ee62e2e8c98e0c7c91c8df0826eff800' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:56.149569"], ["extension", "txt"], ["name", "Test"], ["token", "ee62e2e8c98e0c7c91c8df0826eff800"], ["updated_at", "2014-11-03 15:47:56.149569"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b214cfbb3faa9c804468d3bd5d29b3ea' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:56.152255"], ["extension", "txt"], ["name", "Test"], ["token", "b214cfbb3faa9c804468d3bd5d29b3ea"], ["updated_at", "2014-11-03 15:47:56.152255"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f9768f7ef84e682a929e04740ae99c52' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:47:56.154839"], ["extension", "txt"], ["name", "Test"], ["token", "f9768f7ef84e682a929e04740ae99c52"], ["updated_at", "2014-11-03 15:47:56.154839"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'afde30df185217c517a33b692c7607b4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:48:38.111295"], ["extension", "txt"], ["name", "Test"], ["token", "afde30df185217c517a33b692c7607b4"], ["updated_at", "2014-11-03 15:48:38.111295"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7329287d2397f48094e2d17ffa6276dd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:48:38.120119"], ["extension", "txt"], ["name", "Test"], ["token", "7329287d2397f48094e2d17ffa6276dd"], ["updated_at", "2014-11-03 15:48:38.120119"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ac5089deab13e81d15da95d887c04a75' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:48:38.123697"], ["extension", "txt"], ["name", "Test"], ["token", "ac5089deab13e81d15da95d887c04a75"], ["updated_at", "2014-11-03 15:48:38.123697"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '75c9c2144be8d338fb607148268ffdd4' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:48:38.125677"], ["extension", "txt"], ["name", "Test"], ["token", "75c9c2144be8d338fb607148268ffdd4"], ["updated_at", "2014-11-03 15:48:38.125677"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9e0bbb7cade6fd367c4dda9a8c813c6c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:48:38.129240"], ["extension", "txt"], ["name", "Test"], ["token", "9e0bbb7cade6fd367c4dda9a8c813c6c"], ["updated_at", "2014-11-03 15:48:38.129240"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0fa2fc002999539f179dd9c5fe75f0ef' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:51:52.361624"], ["extension", "txt"], ["name", "Test"], ["token", "0fa2fc002999539f179dd9c5fe75f0ef"], ["updated_at", "2014-11-03 15:51:52.361624"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fa5bd8bee1763afe54d9eae7e317ef90' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:51:52.371204"], ["extension", "txt"], ["name", "Test"], ["token", "fa5bd8bee1763afe54d9eae7e317ef90"], ["updated_at", "2014-11-03 15:51:52.371204"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '148ea8e3d641291cf387b82355a57be1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:51:52.376125"], ["extension", "txt"], ["name", "Test"], ["token", "148ea8e3d641291cf387b82355a57be1"], ["updated_at", "2014-11-03 15:51:52.376125"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (2.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7d7553b3a21011e4c3c7fceaa454f58e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:51:52.380645"], ["extension", "txt"], ["name", "Test"], ["token", "7d7553b3a21011e4c3c7fceaa454f58e"], ["updated_at", "2014-11-03 15:51:52.380645"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '41948ee27476d29fb05d53c3bc386d70' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:51:52.383779"], ["extension", "txt"], ["name", "Test"], ["token", "41948ee27476d29fb05d53c3bc386d70"], ["updated_at", "2014-11-03 15:51:52.383779"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '04221004199ec8d3a92d6657f1ee2305' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:52:32.542807"], ["extension", "txt"], ["name", "Test"], ["token", "04221004199ec8d3a92d6657f1ee2305"], ["updated_at", "2014-11-03 15:52:32.542807"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '98a20985541bb902f7f36865bb6fe90c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:52:32.552309"], ["extension", "txt"], ["name", "Test"], ["token", "98a20985541bb902f7f36865bb6fe90c"], ["updated_at", "2014-11-03 15:52:32.552309"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '41ec670b7153e81597ae7d2df860c2ce' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:52:32.555283"], ["extension", "txt"], ["name", "Test"], ["token", "41ec670b7153e81597ae7d2df860c2ce"], ["updated_at", "2014-11-03 15:52:32.555283"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '825b65d33b5f14f236ea13f925a7e602' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:52:32.558108"], ["extension", "txt"], ["name", "Test"], ["token", "825b65d33b5f14f236ea13f925a7e602"], ["updated_at", "2014-11-03 15:52:32.558108"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2ec93658a4de4e76237ae0d3982fdb82' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:52:32.561330"], ["extension", "txt"], ["name", "Test"], ["token", "2ec93658a4de4e76237ae0d3982fdb82"], ["updated_at", "2014-11-03 15:52:32.561330"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fb9f23dbafdbf7972b25a056822e0318' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:55:07.150466"], ["extension", "txt"], ["name", "Test"], ["token", "fb9f23dbafdbf7972b25a056822e0318"], ["updated_at", "2014-11-03 15:55:07.150466"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8a1878d233fbce6490c34426d783d95b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:55:07.159309"], ["extension", "txt"], ["name", "Test"], ["token", "8a1878d233fbce6490c34426d783d95b"], ["updated_at", "2014-11-03 15:55:07.159309"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '314614096adb4cd0e54c03c0f6020303' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:55:07.161655"], ["extension", "txt"], ["name", "Test"], ["token", "314614096adb4cd0e54c03c0f6020303"], ["updated_at", "2014-11-03 15:55:07.161655"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '608f5347597cab807e929219eebc03c3' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:55:07.163776"], ["extension", "txt"], ["name", "Test"], ["token", "608f5347597cab807e929219eebc03c3"], ["updated_at", "2014-11-03 15:55:07.163776"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '634ddd74d28cdb29e9f48426b63353dc' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:55:07.165818"], ["extension", "txt"], ["name", "Test"], ["token", "634ddd74d28cdb29e9f48426b63353dc"], ["updated_at", "2014-11-03 15:55:07.165818"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cf81aeede99104cd3e5c95c19ca5c943' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:57:16.656209"], ["extension", "txt"], ["name", "Test"], ["token", "cf81aeede99104cd3e5c95c19ca5c943"], ["updated_at", "2014-11-03 15:57:16.656209"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4018ffb011c074869913b867ca6f3ec4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:57:16.665314"], ["extension", "txt"], ["name", "Test"], ["token", "4018ffb011c074869913b867ca6f3ec4"], ["updated_at", "2014-11-03 15:57:16.665314"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b6995701b3bf53b0ccaf595998a55422' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:57:16.667666"], ["extension", "txt"], ["name", "Test"], ["token", "b6995701b3bf53b0ccaf595998a55422"], ["updated_at", "2014-11-03 15:57:16.667666"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd8ba1ba555ccb37b7e530f7933bae0ae' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:57:16.669756"], ["extension", "txt"], ["name", "Test"], ["token", "d8ba1ba555ccb37b7e530f7933bae0ae"], ["updated_at", "2014-11-03 15:57:16.669756"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1833cdc8c5bad4fadb083c7b3eedb400' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:57:16.671826"], ["extension", "txt"], ["name", "Test"], ["token", "1833cdc8c5bad4fadb083c7b3eedb400"], ["updated_at", "2014-11-03 15:57:16.671826"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ddf9fdf7ecdf988d4d09ce2c6128a200' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:58:28.264301"], ["extension", "txt"], ["name", "Test"], ["token", "ddf9fdf7ecdf988d4d09ce2c6128a200"], ["updated_at", "2014-11-03 15:58:28.264301"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '841f9a32f4f819b96a61dfd13ab24ec4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:58:28.273721"], ["extension", "txt"], ["name", "Test"], ["token", "841f9a32f4f819b96a61dfd13ab24ec4"], ["updated_at", "2014-11-03 15:58:28.273721"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '96a70e2fd3d5a7bf673693f54e71fc4d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:58:28.276671"], ["extension", "txt"], ["name", "Test"], ["token", "96a70e2fd3d5a7bf673693f54e71fc4d"], ["updated_at", "2014-11-03 15:58:28.276671"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '99f0e65ead368064035d2d6aef9563ae' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:58:28.279439"], ["extension", "txt"], ["name", "Test"], ["token", "99f0e65ead368064035d2d6aef9563ae"], ["updated_at", "2014-11-03 15:58:28.279439"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b489efe748ba67c0d6241b32a2a318f5' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 15:58:28.282040"], ["extension", "txt"], ["name", "Test"], ["token", "b489efe748ba67c0d6241b32a2a318f5"], ["updated_at", "2014-11-03 15:58:28.282040"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8237d4fd063ba7508036473378cc2582' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:03.882544"], ["extension", "txt"], ["name", "Test"], ["token", "8237d4fd063ba7508036473378cc2582"], ["updated_at", "2014-11-03 16:00:03.882544"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aa1d67a5b0a5663c8e637d8a8b4da13e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:03.892029"], ["extension", "txt"], ["name", "Test"], ["token", "aa1d67a5b0a5663c8e637d8a8b4da13e"], ["updated_at", "2014-11-03 16:00:03.892029"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '889d0525f624f23c270a816dce5019dd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:03.895112"], ["extension", "txt"], ["name", "Test"], ["token", "889d0525f624f23c270a816dce5019dd"], ["updated_at", "2014-11-03 16:00:03.895112"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '815398baefee4cdb5054756deb8d5d04' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:03.897833"], ["extension", "txt"], ["name", "Test"], ["token", "815398baefee4cdb5054756deb8d5d04"], ["updated_at", "2014-11-03 16:00:03.897833"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7c8416cbb604e043452983db2c75707e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:03.900671"], ["extension", "txt"], ["name", "Test"], ["token", "7c8416cbb604e043452983db2c75707e"], ["updated_at", "2014-11-03 16:00:03.900671"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '735dee4265f72afb2bfc4b7142772e31' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:57.674999"], ["extension", "txt"], ["name", "Test"], ["token", "735dee4265f72afb2bfc4b7142772e31"], ["updated_at", "2014-11-03 16:00:57.674999"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '54e6334d505070496249f1c4b6d60db1' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:57.683070"], ["extension", "txt"], ["name", "Test"], ["token", "54e6334d505070496249f1c4b6d60db1"], ["updated_at", "2014-11-03 16:00:57.683070"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fa8e15848f47459f8f59467dce790534' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:57.687770"], ["extension", "txt"], ["name", "Test"], ["token", "fa8e15848f47459f8f59467dce790534"], ["updated_at", "2014-11-03 16:00:57.687770"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '828f34a30bf19992c9fe3426c9e9468f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:57.691414"], ["extension", "txt"], ["name", "Test"], ["token", "828f34a30bf19992c9fe3426c9e9468f"], ["updated_at", "2014-11-03 16:00:57.691414"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.4ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '23599b88ad8a82df9b64b2ee4a337a23' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:00:57.694820"], ["extension", "txt"], ["name", "Test"], ["token", "23599b88ad8a82df9b64b2ee4a337a23"], ["updated_at", "2014-11-03 16:00:57.694820"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '961825a9cf4d84974492c9e4826896b7' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:07.693925"], ["extension", "txt"], ["name", "Test"], ["token", "961825a9cf4d84974492c9e4826896b7"], ["updated_at", "2014-11-03 16:01:07.693925"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '04695ce8cd5b19561052ac58c4c8c01a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:07.704716"], ["extension", "txt"], ["name", "Test"], ["token", "04695ce8cd5b19561052ac58c4c8c01a"], ["updated_at", "2014-11-03 16:01:07.704716"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f3dd62bced838b2509b2e9aee9a5df16' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:07.707790"], ["extension", "txt"], ["name", "Test"], ["token", "f3dd62bced838b2509b2e9aee9a5df16"], ["updated_at", "2014-11-03 16:01:07.707790"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6426e6316a1367b3acf9c29a2b34d52a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:07.710637"], ["extension", "txt"], ["name", "Test"], ["token", "6426e6316a1367b3acf9c29a2b34d52a"], ["updated_at", "2014-11-03 16:01:07.710637"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ce8dc66f7d127413065eb4fd5942594b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:07.713302"], ["extension", "txt"], ["name", "Test"], ["token", "ce8dc66f7d127413065eb4fd5942594b"], ["updated_at", "2014-11-03 16:01:07.713302"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f9000d787ef896a54f4890f5c72fd403' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:32.909113"], ["extension", "txt"], ["name", "Test"], ["token", "f9000d787ef896a54f4890f5c72fd403"], ["updated_at", "2014-11-03 16:01:32.909113"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '337e73d8f3c5520918173043b755d5d8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:32.918218"], ["extension", "txt"], ["name", "Test"], ["token", "337e73d8f3c5520918173043b755d5d8"], ["updated_at", "2014-11-03 16:01:32.918218"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'be081e142d4105c39683dbd81fa631d6' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:32.921373"], ["extension", "txt"], ["name", "Test"], ["token", "be081e142d4105c39683dbd81fa631d6"], ["updated_at", "2014-11-03 16:01:32.921373"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f389794027abf519eb8e1cf50522f9c2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:32.924165"], ["extension", "txt"], ["name", "Test"], ["token", "f389794027abf519eb8e1cf50522f9c2"], ["updated_at", "2014-11-03 16:01:32.924165"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2b2f7171a4ca98d7d9f5bebae0cc94ee' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:01:32.926978"], ["extension", "txt"], ["name", "Test"], ["token", "2b2f7171a4ca98d7d9f5bebae0cc94ee"], ["updated_at", "2014-11-03 16:01:32.926978"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '46d0816ec7a6ddf7ebfc051e72cd492a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:02:20.987853"], ["extension", "txt"], ["name", "Test"], ["token", "46d0816ec7a6ddf7ebfc051e72cd492a"], ["updated_at", "2014-11-03 16:02:20.987853"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd6eeb38bafc3b2d61bed1f9412b5ddab' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:02:20.992456"], ["extension", "txt"], ["name", "Test"], ["token", "d6eeb38bafc3b2d61bed1f9412b5ddab"], ["updated_at", "2014-11-03 16:02:20.992456"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '77fe967e9ed469ef05534dbf846dc719' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:02:20.995313"], ["extension", "txt"], ["name", "Test"], ["token", "77fe967e9ed469ef05534dbf846dc719"], ["updated_at", "2014-11-03 16:02:20.995313"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1fb0731aceae9c4a7a7f6d32a46a41c8' LIMIT 1 SQL (0.1ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:02:20.997577"], ["extension", "txt"], ["name", "Test"], ["token", "1fb0731aceae9c4a7a7f6d32a46a41c8"], ["updated_at", "2014-11-03 16:02:20.997577"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '947c912710fdd5cff3bee603c6ec12c0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:02:20.999872"], ["extension", "txt"], ["name", "Test"], ["token", "947c912710fdd5cff3bee603c6ec12c0"], ["updated_at", "2014-11-03 16:02:20.999872"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (4.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.3ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:02:43', '2014-11-03 16:02:43', 517391740)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:20', '2014-11-03 16:03:20', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:20', '2014-11-03 16:03:20', 517391740)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740) SQLite3::ConstraintException: NOT NULL constraint failed: fogged_resources.token: INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', '2014-11-03 16:03:21', '2014-11-03 16:03:21', 517391740)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-03 16:04:02', '2014-11-03 16:04:02', 591498715)  (5.2ms) commit transaction  (0.5ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b95e740679b6fba435f5cf9784afe5f4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:04:02.172230"], ["extension", "txt"], ["name", "Test"], ["token", "b95e740679b6fba435f5cf9784afe5f4"], ["updated_at", "2014-11-03 16:04:02.172230"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '61a6729b52043ecb067df1ec7dcc3747' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:04:02.175403"], ["extension", "txt"], ["name", "Test"], ["token", "61a6729b52043ecb067df1ec7dcc3747"], ["updated_at", "2014-11-03 16:04:02.175403"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd0fb7c65849f11af5f6d145c78c90b00' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:04:02.178243"], ["extension", "txt"], ["name", "Test"], ["token", "d0fb7c65849f11af5f6d145c78c90b00"], ["updated_at", "2014-11-03 16:04:02.178243"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b567f53a586f88a2d7299dd82bf48c8e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:04:02.181262"], ["extension", "txt"], ["name", "Test"], ["token", "b567f53a586f88a2d7299dd82bf48c8e"], ["updated_at", "2014-11-03 16:04:02.181262"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1e792e90d6e6838041d28f09c59ba5bb' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-03 16:04:02.184790"], ["extension", "txt"], ["name", "Test"], ["token", "1e792e90d6e6838041d28f09c59ba5bb"], ["updated_at", "2014-11-03 16:04:02.184790"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:01:25', '2014-11-04 08:01:25', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '503139801b9f3e03856e801a942c089b' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 08:01:25.516448"], ["extension", "txt"], ["name", "Test"], ["token", "503139801b9f3e03856e801a942c089b"], ["updated_at", "2014-11-04 08:01:25.516448"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'de4582bc60068c2a4abbd13987b77076' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 08:01:25.520017"], ["extension", "txt"], ["name", "Test"], ["token", "de4582bc60068c2a4abbd13987b77076"], ["updated_at", "2014-11-04 08:01:25.520017"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6fda1eb358ad58d74e677806098b231c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 08:01:25.522381"], ["extension", "txt"], ["name", "Test"], ["token", "6fda1eb358ad58d74e677806098b231c"], ["updated_at", "2014-11-04 08:01:25.522381"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9d185bdd7d7be29bfa3d6d51fb3e2f95' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 08:01:25.524564"], ["extension", "txt"], ["name", "Test"], ["token", "9d185bdd7d7be29bfa3d6d51fb3e2f95"], ["updated_at", "2014-11-04 08:01:25.524564"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dac8b5d2145b6ffbe52aa43dc24eeebe' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 08:01:25.527370"], ["extension", "txt"], ["name", "Test"], ["token", "dac8b5d2145b6ffbe52aa43dc24eeebe"], ["updated_at", "2014-11-04 08:01:25.527370"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 132093124) Fixture Insert (0.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 431685987) Fixture Insert (0.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 68463692) Fixture Insert (0.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:01:54', '2014-11-04 08:01:54', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:06:25', '2014-11-04 08:06:25', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:07:28', '2014-11-04 08:07:28', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:31:48', '2014-11-04 08:31:48', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:33:13', '2014-11-04 08:33:13', 591498715)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (1.0ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.1ms) select sqlite_version(*)  (0.8ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.0ms) DROP TABLE "fogged_resources"  (0.8ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.1ms) SELECT version FROM "schema_migrations"  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104083706') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:37:29', '2014-11-04 08:37:29', 591498715)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 08:38:48', '2014-11-04 08:38:48', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 431685987) Fixture Insert (0.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 68463692) Fixture Insert (0.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:12:42', '2014-11-04 09:12:42', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:16:20', '2014-11-04 09:16:20', 591498715)  (4.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:19:28', '2014-11-04 09:19:28', 591498715)  (6.4ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:19:46', '2014-11-04 09:19:46', 591498715)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:41:47', '2014-11-04 09:41:47', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 09:41:47.530789"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:43:38', '2014-11-04 09:43:38', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 09:43:38.926352"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:46:02', '2014-11-04 09:46:02', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '504d4d7c5e5e74fa28ca7aa07c067d2f' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:02.547680"], ["extension", "txt"], ["name", "Test"], ["token", "504d4d7c5e5e74fa28ca7aa07c067d2f"], ["updated_at", "2014-11-04 09:46:02.547680"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6d2f16ecd4c08257d7b5205b875d28e3' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:02.552900"], ["extension", "txt"], ["name", "Test"], ["token", "6d2f16ecd4c08257d7b5205b875d28e3"], ["updated_at", "2014-11-04 09:46:02.552900"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e6b3a338e8743d350cb9b62be8a70e3f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:02.559329"], ["extension", "txt"], ["name", "Test"], ["token", "e6b3a338e8743d350cb9b62be8a70e3f"], ["updated_at", "2014-11-04 09:46:02.559329"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '60b707a4f137abe722870cb43caf752f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:02.561834"], ["extension", "txt"], ["name", "Test"], ["token", "60b707a4f137abe722870cb43caf752f"], ["updated_at", "2014-11-04 09:46:02.561834"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c9e592d37a6a26d045dc95fc549ae555' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:02.564624"], ["extension", "txt"], ["name", "Test"], ["token", "c9e592d37a6a26d045dc95fc549ae555"], ["updated_at", "2014-11-04 09:46:02.564624"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 09:46:02.578741"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:46:44', '2014-11-04 09:46:44', 591498715)  (5.4ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'db7dd367d5c5e05f7c6ef42d57b5e04d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:44.300921"], ["extension", "txt"], ["name", "Test"], ["token", "db7dd367d5c5e05f7c6ef42d57b5e04d"], ["updated_at", "2014-11-04 09:46:44.300921"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '27132d9a243745b0405552335937ee8c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:44.304203"], ["extension", "txt"], ["name", "Test"], ["token", "27132d9a243745b0405552335937ee8c"], ["updated_at", "2014-11-04 09:46:44.304203"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4f0ccdb0bb3b8a7877f4ecf8c4557e04' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:44.310458"], ["extension", "txt"], ["name", "Test"], ["token", "4f0ccdb0bb3b8a7877f4ecf8c4557e04"], ["updated_at", "2014-11-04 09:46:44.310458"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cdf615abf2db025bfc2da36003d57087' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:44.313682"], ["extension", "txt"], ["name", "Test"], ["token", "cdf615abf2db025bfc2da36003d57087"], ["updated_at", "2014-11-04 09:46:44.313682"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd790e88f1cd5bee623dfdd7e61cc9b8b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:46:44.316149"], ["extension", "txt"], ["name", "Test"], ["token", "d790e88f1cd5bee623dfdd7e61cc9b8b"], ["updated_at", "2014-11-04 09:46:44.316149"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 09:46:44.328709"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 09:47:10', '2014-11-04 09:47:10', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '43d6a2f279cd6b64e3f0efc232095ba0' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:47:10.407589"], ["extension", "txt"], ["name", "Test"], ["token", "43d6a2f279cd6b64e3f0efc232095ba0"], ["updated_at", "2014-11-04 09:47:10.407589"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '12ff12fb5f3d112fe7b47d2e8520f0e9' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:47:10.410855"], ["extension", "txt"], ["name", "Test"], ["token", "12ff12fb5f3d112fe7b47d2e8520f0e9"], ["updated_at", "2014-11-04 09:47:10.410855"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '80754341a19e48a3a16e77f808e33b3a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:47:10.417463"], ["extension", "txt"], ["name", "Test"], ["token", "80754341a19e48a3a16e77f808e33b3a"], ["updated_at", "2014-11-04 09:47:10.417463"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd16cbcaff5aea0de85ba051fe43b60cd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:47:10.420187"], ["extension", "txt"], ["name", "Test"], ["token", "d16cbcaff5aea0de85ba051fe43b60cd"], ["updated_at", "2014-11-04 09:47:10.420187"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '819858bf483eb41573c10be52519239a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 09:47:10.422753"], ["extension", "txt"], ["name", "Test"], ["token", "819858bf483eb41573c10be52519239a"], ["updated_at", "2014-11-04 09:47:10.422753"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 09:47:10.435710"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:06:47', '2014-11-04 10:06:47', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd8f7206df7f20d336916b69e6869e365' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:06:47.324599"], ["extension", "txt"], ["name", "Test"], ["token", "d8f7206df7f20d336916b69e6869e365"], ["updated_at", "2014-11-04 10:06:47.324599"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '87cc96fcb0288dcffeec5f61b6bf1565' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:06:47.328465"], ["extension", "txt"], ["name", "Test"], ["token", "87cc96fcb0288dcffeec5f61b6bf1565"], ["updated_at", "2014-11-04 10:06:47.328465"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4653fc0cfed764ca34df7fb1b579af44' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:06:47.334582"], ["extension", "txt"], ["name", "Test"], ["token", "4653fc0cfed764ca34df7fb1b579af44"], ["updated_at", "2014-11-04 10:06:47.334582"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '947a7ccc482836ad1a275c079e62d068' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:06:47.338784"], ["extension", "txt"], ["name", "Test"], ["token", "947a7ccc482836ad1a275c079e62d068"], ["updated_at", "2014-11-04 10:06:47.338784"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5c660fe25c0b5363d87baab551772981' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:06:47.341659"], ["extension", "txt"], ["name", "Test"], ["token", "5c660fe25c0b5363d87baab551772981"], ["updated_at", "2014-11-04 10:06:47.341659"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 10:06:47.355886"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:07:46', '2014-11-04 10:07:46', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7144710b2fb523b60183ff458f9018da' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:07:46.331954"], ["extension", "txt"], ["name", "Test"], ["token", "7144710b2fb523b60183ff458f9018da"], ["updated_at", "2014-11-04 10:07:46.331954"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6440d4128600eea827a9f9d70e6afbe8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:07:46.335202"], ["extension", "txt"], ["name", "Test"], ["token", "6440d4128600eea827a9f9d70e6afbe8"], ["updated_at", "2014-11-04 10:07:46.335202"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dfd7046ef25fe5f804e4ee22c7415dce' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:07:46.341856"], ["extension", "txt"], ["name", "Test"], ["token", "dfd7046ef25fe5f804e4ee22c7415dce"], ["updated_at", "2014-11-04 10:07:46.341856"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '458bcd203e275f789097bba7c399b16c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:07:46.344841"], ["extension", "txt"], ["name", "Test"], ["token", "458bcd203e275f789097bba7c399b16c"], ["updated_at", "2014-11-04 10:07:46.344841"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b9885f6566757d1847d9ad3993526b22' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:07:46.347616"], ["extension", "txt"], ["name", "Test"], ["token", "b9885f6566757d1847d9ad3993526b22"], ["updated_at", "2014-11-04 10:07:46.347616"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 10:07:46.360476"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:08:03', '2014-11-04 10:08:03', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '012a994622873d5222ff983398c01749' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:08:03.442335"], ["extension", "txt"], ["name", "Test"], ["token", "012a994622873d5222ff983398c01749"], ["updated_at", "2014-11-04 10:08:03.442335"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:27:44', '2014-11-04 10:27:44', 591498715)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5d961d52e63407b992be646fe93db21b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:27:44.659661"], ["extension", "txt"], ["name", "Test"], ["token", "5d961d52e63407b992be646fe93db21b"], ["updated_at", "2014-11-04 10:27:44.659661"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:28:41', '2014-11-04 10:28:41', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '479e834e7c911969b0103467a140cdb7' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:28:41.252966"], ["extension", "txt"], ["name", "Test"], ["token", "479e834e7c911969b0103467a140cdb7"], ["updated_at", "2014-11-04 10:28:41.252966"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:29:50', '2014-11-04 10:29:50', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5f1fe079b459481eba3905ad02f734e1' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:29:50.370332"], ["extension", "txt"], ["name", "Test"], ["token", "5f1fe079b459481eba3905ad02f734e1"], ["updated_at", "2014-11-04 10:29:50.370332"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:53:48', '2014-11-04 10:53:48', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f0b83f302a8389734cafa02fd44a0f66' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:53:48.199965"], ["extension", "txt"], ["name", "Test"], ["token", "f0b83f302a8389734cafa02fd44a0f66"], ["updated_at", "2014-11-04 10:53:48.199965"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:55:00', '2014-11-04 10:55:00', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7c26ff309e1f8cff106b456a864aa455' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:55:00.281738"], ["extension", "txt"], ["name", "Test"], ["token", "7c26ff309e1f8cff106b456a864aa455"], ["updated_at", "2014-11-04 10:55:00.281738"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:56:27', '2014-11-04 10:56:27', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4409545077d412accbd88d0524bc8292' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:56:27.596778"], ["extension", "txt"], ["name", "Test"], ["token", "4409545077d412accbd88d0524bc8292"], ["updated_at", "2014-11-04 10:56:27.596778"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:57:00', '2014-11-04 10:57:00', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '44451603a8979b5a28bdf989acc67293' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:57:00.079345"], ["extension", "txt"], ["name", "Test"], ["token", "44451603a8979b5a28bdf989acc67293"], ["updated_at", "2014-11-04 10:57:00.079345"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:57:09', '2014-11-04 10:57:09', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2a0f4d208bc776a575abb88f61123a7b' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:57:09.744240"], ["extension", "txt"], ["name", "Test"], ["token", "2a0f4d208bc776a575abb88f61123a7b"], ["updated_at", "2014-11-04 10:57:09.744240"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '31bff19079ce6fa9bc30f8dcbdbfff84' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:57:09.750137"], ["extension", "txt"], ["name", "Test"], ["token", "31bff19079ce6fa9bc30f8dcbdbfff84"], ["updated_at", "2014-11-04 10:57:09.750137"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '67e60948d0212dc04c983223da0026f7' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:57:09.757027"], ["extension", "txt"], ["name", "Test"], ["token", "67e60948d0212dc04c983223da0026f7"], ["updated_at", "2014-11-04 10:57:09.757027"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1d059bc3ccbb5ee5ea26a3d6dfcbae6c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:57:09.760850"], ["extension", "txt"], ["name", "Test"], ["token", "1d059bc3ccbb5ee5ea26a3d6dfcbae6c"], ["updated_at", "2014-11-04 10:57:09.760850"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1be60cb01076fd041706fbcfff1dbd1b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 10:57:09.764831"], ["extension", "txt"], ["name", "Test"], ["token", "1be60cb01076fd041706fbcfff1dbd1b"], ["updated_at", "2014-11-04 10:57:09.764831"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 10:57:09.779603"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (3.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:57:19', '2014-11-04 10:57:19', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 10:59:49', '2014-11-04 10:59:49', 591498715)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:00:10', '2014-11-04 11:00:10', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:00:10.306459"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:02:39', '2014-11-04 11:02:39', 591498715)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:02:39.258233"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:02:39.271234"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:02:39.271075"], ["updated_at", "2014-11-04 11:02:39.271234"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:02:54', '2014-11-04 11:02:54', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '01b6beb9e357cadea2e5b6401a882ab9' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:02:54.905824"], ["extension", "txt"], ["name", "Test"], ["token", "01b6beb9e357cadea2e5b6401a882ab9"], ["updated_at", "2014-11-04 11:02:54.905824"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5712429837591f309fc00742a7ef7184' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:02:54.910875"], ["extension", "txt"], ["name", "Test"], ["token", "5712429837591f309fc00742a7ef7184"], ["updated_at", "2014-11-04 11:02:54.910875"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'eecdda60061ce3cf5b9e9b10f79f3d72' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:02:54.916889"], ["extension", "txt"], ["name", "Test"], ["token", "eecdda60061ce3cf5b9e9b10f79f3d72"], ["updated_at", "2014-11-04 11:02:54.916889"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2b7380d0abf9cfe9694bab7c1b44798d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:02:54.919915"], ["extension", "txt"], ["name", "Test"], ["token", "2b7380d0abf9cfe9694bab7c1b44798d"], ["updated_at", "2014-11-04 11:02:54.919915"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '56f8fd417c09453b634c87627343ba39' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:02:54.923715"], ["extension", "txt"], ["name", "Test"], ["token", "56f8fd417c09453b634c87627343ba39"], ["updated_at", "2014-11-04 11:02:54.923715"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 11:02:54.940340"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:02:54.948808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:02:54.960045"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:02:54.959894"], ["updated_at", "2014-11-04 11:02:54.960045"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:04:36', '2014-11-04 11:04:36', 591498715)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:04:43', '2014-11-04 11:04:43', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:04:43.311202"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:04:43.323235"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:04:43.323103"], ["updated_at", "2014-11-04 11:04:43.323235"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:04:58', '2014-11-04 11:04:58', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:04:58.715832"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:04:58.727230"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:04:58.727103"], ["updated_at", "2014-11-04 11:04:58.727230"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:05:05', '2014-11-04 11:05:05', 591498715)  (0.6ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:05:05.746947"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:05:05.758940"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:05:05.758802"], ["updated_at", "2014-11-04 11:05:05.758940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:06:44', '2014-11-04 11:06:44', 591498715)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing -----------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success --------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown --------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting --------------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:07:43', '2014-11-04 11:07:43', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:43.504199"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:07:43.510639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:07:43.522688"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:07:43.000000000 Z\n updated_at: 2014-11-04 11:07:43.510639000 Z\n"], ["run_at", "2014-11-04 11:07:53.513101"], ["updated_at", "2014-11-04 11:07:43.522688"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:43.527289"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 11:07:43.529928"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:43.533117"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:43.536142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:07:43.539549"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:07:43.543522"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:07:43.000000000 Z\n updated_at: 2014-11-04 11:07:43.539549000 Z\n"], ["run_at", "2014-11-04 11:07:53.540518"], ["updated_at", "2014-11-04 11:07:43.543522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:07:49', '2014-11-04 11:07:49', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:07:49.466979"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:07:49.480544"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:07:49.480379"], ["updated_at", "2014-11-04 11:07:49.480544"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5458df317a039c796cb7a44389c89939' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:07:49.490129"], ["extension", "txt"], ["name", "Test"], ["token", "5458df317a039c796cb7a44389c89939"], ["updated_at", "2014-11-04 11:07:49.490129"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '014795c0a0ba4c61f80de23459daea62' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:07:49.493391"], ["extension", "txt"], ["name", "Test"], ["token", "014795c0a0ba4c61f80de23459daea62"], ["updated_at", "2014-11-04 11:07:49.493391"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7342cdd385659d3f9676a388f6ad58a8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:07:49.498634"], ["extension", "txt"], ["name", "Test"], ["token", "7342cdd385659d3f9676a388f6ad58a8"], ["updated_at", "2014-11-04 11:07:49.498634"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '013fee2abd5cd2a794367b8958b507df' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:07:49.501137"], ["extension", "txt"], ["name", "Test"], ["token", "013fee2abd5cd2a794367b8958b507df"], ["updated_at", "2014-11-04 11:07:49.501137"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c37a7e2e7286ed9fb5765ec8fc597bb3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:07:49.504310"], ["extension", "txt"], ["name", "Test"], ["token", "c37a7e2e7286ed9fb5765ec8fc597bb3"], ["updated_at", "2014-11-04 11:07:49.504310"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 11:07:49.515471"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:07:49.524846"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:07:49.528161"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:07:49.528078"], ["updated_at", "2014-11-04 11:07:49.528161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:49.531937"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:07:49.534276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:07:49.537756"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:07:49.000000000 Z\n updated_at: 2014-11-04 11:07:49.534276000 Z\n"], ["run_at", "2014-11-04 11:07:59.535114"], ["updated_at", "2014-11-04 11:07:49.537756"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:49.541461"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 11:07:49.544173"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:49.547614"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:07:49.551185"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:07:49.553660"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:07:49.557087"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:07:49.000000000 Z\n updated_at: 2014-11-04 11:07:49.553660000 Z\n"], ["run_at", "2014-11-04 11:07:59.554352"], ["updated_at", "2014-11-04 11:07:49.557087"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:08:57', '2014-11-04 11:08:57', 591498715)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:08:57.716446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:08:57.729489"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:08:57.729321"], ["updated_at", "2014-11-04 11:08:57.729489"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ba3c7045516b40140fc7d784fee88c77' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:08:57.738759"], ["extension", "txt"], ["name", "Test"], ["token", "ba3c7045516b40140fc7d784fee88c77"], ["updated_at", "2014-11-04 11:08:57.738759"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '896d5a07bc95f35fdc4026b39cb0150a' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:08:57.741754"], ["extension", "txt"], ["name", "Test"], ["token", "896d5a07bc95f35fdc4026b39cb0150a"], ["updated_at", "2014-11-04 11:08:57.741754"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3ce0abc74011ded3c12e330a73149d1b' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:08:57.751911"], ["extension", "txt"], ["name", "Test"], ["token", "3ce0abc74011ded3c12e330a73149d1b"], ["updated_at", "2014-11-04 11:08:57.751911"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f03f84f878c2b0cabb87f04f0f2b323b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:08:57.756644"], ["extension", "txt"], ["name", "Test"], ["token", "f03f84f878c2b0cabb87f04f0f2b323b"], ["updated_at", "2014-11-04 11:08:57.756644"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'af058b33fee69b53832cd4e50d22ede7' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:08:57.761726"], ["extension", "txt"], ["name", "Test"], ["token", "af058b33fee69b53832cd4e50d22ede7"], ["updated_at", "2014-11-04 11:08:57.761726"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 11:08:57.773978"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:08:57.779243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:08:57.785489"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:08:57.785319"], ["updated_at", "2014-11-04 11:08:57.785489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing -----------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success --------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown --------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting --------------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:09:06', '2014-11-04 11:09:06', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:09:06.928166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:09:06.938081"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:09:06.937962"], ["updated_at", "2014-11-04 11:09:06.938081"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f602f0f49d0e10df61add1b9c0d14551' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:09:06.953737"], ["extension", "txt"], ["name", "Test"], ["token", "f602f0f49d0e10df61add1b9c0d14551"], ["updated_at", "2014-11-04 11:09:06.953737"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a2ea544a214f2e6e4823f349273654ad' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:09:06.957009"], ["extension", "txt"], ["name", "Test"], ["token", "a2ea544a214f2e6e4823f349273654ad"], ["updated_at", "2014-11-04 11:09:06.957009"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4be659c25d2b51861503c3b7f8531a6a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:09:06.961817"], ["extension", "txt"], ["name", "Test"], ["token", "4be659c25d2b51861503c3b7f8531a6a"], ["updated_at", "2014-11-04 11:09:06.961817"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bf190479c2d60da5e5e0911fd412cda7' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:09:06.964031"], ["extension", "txt"], ["name", "Test"], ["token", "bf190479c2d60da5e5e0911fd412cda7"], ["updated_at", "2014-11-04 11:09:06.964031"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0c74f224ba52dd5c684f7a6f29e3a8ee' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:09:06.966967"], ["extension", "txt"], ["name", "Test"], ["token", "0c74f224ba52dd5c684f7a6f29e3a8ee"], ["updated_at", "2014-11-04 11:09:06.966967"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 11:09:06.980436"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:09:06.986930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:09:06.989657"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:09:06.989578"], ["updated_at", "2014-11-04 11:09:06.989657"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:09:06.993270"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:09:06.995490"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:09:06.998786"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:09:06.000000000 Z\n updated_at: 2014-11-04 11:09:06.995490000 Z\n"], ["run_at", "2014-11-04 11:09:16.996215"], ["updated_at", "2014-11-04 11:09:06.998786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:09:07.002274"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 11:09:07.005895"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:09:07.009923"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:09:07.013302"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:09:07.015437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:09:07.018550"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:09:06.000000000 Z\n updated_at: 2014-11-04 11:09:07.015437000 Z\n"], ["run_at", "2014-11-04 11:09:17.016075"], ["updated_at", "2014-11-04 11:09:07.018550"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 11:17:45', '2014-11-04 11:17:45', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:17:45.096550"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:17:45.101930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:17:45.113740"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:17:45.000000000 Z\n updated_at: 2014-11-04 11:17:45.101930000 Z\n"], ["run_at", "2014-11-04 11:17:55.103694"], ["updated_at", "2014-11-04 11:17:45.113740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:17:45.117777"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 11:17:45.120501"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:17:45.124384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 11:17:45.127836"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 11:17:45.129830"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:17:45.133004"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 11:17:45.000000000 Z\n updated_at: 2014-11-04 11:17:45.129830000 Z\n"], ["run_at", "2014-11-04 11:17:55.130496"], ["updated_at", "2014-11-04 11:17:45.133004"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2e0be9ac10acd9c9734a8b81145d1800' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:17:45.142244"], ["extension", "txt"], ["name", "Test"], ["token", "2e0be9ac10acd9c9734a8b81145d1800"], ["updated_at", "2014-11-04 11:17:45.142244"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '281c40a133197df7f2fe8deeac0be0a1' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:17:45.148070"], ["extension", "txt"], ["name", "Test"], ["token", "281c40a133197df7f2fe8deeac0be0a1"], ["updated_at", "2014-11-04 11:17:45.148070"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd70d2b7d6138032f1e7500c6d15284cb' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:17:45.154656"], ["extension", "txt"], ["name", "Test"], ["token", "d70d2b7d6138032f1e7500c6d15284cb"], ["updated_at", "2014-11-04 11:17:45.154656"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2438c5c98600f8c11dcd03fc029daaf2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:17:45.157588"], ["extension", "txt"], ["name", "Test"], ["token", "2438c5c98600f8c11dcd03fc029daaf2"], ["updated_at", "2014-11-04 11:17:45.157588"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8d42541d69b75d4e7fca8797d7a240c1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 11:17:45.161091"], ["extension", "txt"], ["name", "Test"], ["token", "8d42541d69b75d4e7fca8797d7a240c1"], ["updated_at", "2014-11-04 11:17:45.161091"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 11:17:45.171805"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:17:45.177092"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:17:45.179789"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:17:45.179709"], ["updated_at", "2014-11-04 11:17:45.179789"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 11:17:45.190515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 11:17:45.193573"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 11:17:45.193495"], ["updated_at", "2014-11-04 11:17:45.193573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 12:24:44', '2014-11-04 12:24:44', 591498715)  (5.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4c9b4a2311d5233da8ce97c466a060f4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 12:24:44.072644"], ["extension", "txt"], ["name", "Test"], ["token", "4c9b4a2311d5233da8ce97c466a060f4"], ["updated_at", "2014-11-04 12:24:44.072644"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7312f369d27364297fa4765fec64f5b8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 12:24:44.076369"], ["extension", "txt"], ["name", "Test"], ["token", "7312f369d27364297fa4765fec64f5b8"], ["updated_at", "2014-11-04 12:24:44.076369"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0400acf197d3a4162e23e4bae9542bab' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 12:24:44.083456"], ["extension", "txt"], ["name", "Test"], ["token", "0400acf197d3a4162e23e4bae9542bab"], ["updated_at", "2014-11-04 12:24:44.083456"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5cdcd01a9b14d2ce6fd2ba0964799fb7' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 12:24:44.087866"], ["extension", "txt"], ["name", "Test"], ["token", "5cdcd01a9b14d2ce6fd2ba0964799fb7"], ["updated_at", "2014-11-04 12:24:44.087866"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b52c97ee55dffeeb171b9caf64784820' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 12:24:44.091760"], ["extension", "txt"], ["name", "Test"], ["token", "b52c97ee55dffeeb171b9caf64784820"], ["updated_at", "2014-11-04 12:24:44.091760"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 12:24:44.106119"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 12:24:44.114916"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 12:24:44.125999"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 12:24:44.125862"], ["updated_at", "2014-11-04 12:24:44.125999"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 12:24:44.136041"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 12:24:44.138689"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 12:24:44.138615"], ["updated_at", "2014-11-04 12:24:44.138689"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 12:24:44.144417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 12:24:44.146613"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 12:24:44.150129"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 12:24:44.000000000 Z\n updated_at: 2014-11-04 12:24:44.146613000 Z\n"], ["run_at", "2014-11-04 12:24:54.147427"], ["updated_at", "2014-11-04 12:24:44.150129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 12:24:44.154373"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 12:24:44.158918"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 12:24:44.162748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 12:24:44.166711"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 12:24:44.169028"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 12:24:44.172181"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 12:24:44.000000000 Z\n updated_at: 2014-11-04 12:24:44.169028000 Z\n"], ["run_at", "2014-11-04 12:24:54.169826"], ["updated_at", "2014-11-04 12:24:44.172181"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:01:22', '2014-11-04 14:01:22', 591498715)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 591498715)  (4.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:02:05', '2014-11-04 14:02:05', 591498715)  (0.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (4.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.3ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.5ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:12', '2014-11-04 14:06:12', 591498715)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:06:52', '2014-11-04 14:06:52', 591498715)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '84f4ee07a827f3af250eadae4d94a223' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:06:52.583704"], ["extension", "txt"], ["name", "Test"], ["token", "84f4ee07a827f3af250eadae4d94a223"], ["updated_at", "2014-11-04 14:06:52.583704"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2d23c604da984f1f6d6d42d3da00ee57' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:06:52.587481"], ["extension", "txt"], ["name", "Test"], ["token", "2d23c604da984f1f6d6d42d3da00ee57"], ["updated_at", "2014-11-04 14:06:52.587481"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4d98e6f731b9f5a75434a1366970b260' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:06:52.594180"], ["extension", "txt"], ["name", "Test"], ["token", "4d98e6f731b9f5a75434a1366970b260"], ["updated_at", "2014-11-04 14:06:52.594180"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e4cacc8931173691d26ed94640486ce2' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:06:52.598493"], ["extension", "txt"], ["name", "Test"], ["token", "e4cacc8931173691d26ed94640486ce2"], ["updated_at", "2014-11-04 14:06:52.598493"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '54e88b446b18ce213e47bf752da203ff' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:06:52.601418"], ["extension", "txt"], ["name", "Test"], ["token", "54e88b446b18ce213e47bf752da203ff"], ["updated_at", "2014-11-04 14:06:52.601418"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:06:52.619852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 14:06:52.627130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:06:52.638205"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 14:06:52.000000000 Z\n updated_at: 2014-11-04 14:06:52.627130000 Z\n"], ["run_at", "2014-11-04 14:07:02.628719"], ["updated_at", "2014-11-04 14:06:52.638205"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:06:52.642246"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 14:06:52.644826"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:06:52.648264"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:06:52.652879"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 14:06:52.655211"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:06:52.658161"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 14:06:52.000000000 Z\n updated_at: 2014-11-04 14:06:52.655211000 Z\n"], ["run_at", "2014-11-04 14:07:02.655838"], ["updated_at", "2014-11-04 14:06:52.658161"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:43:07', '2014-11-04 14:43:07', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:43:07.579071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (2.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 14:43:07.590701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:43:07.608570"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 14:43:07.000000000 Z\n updated_at: 2014-11-04 14:43:07.590701000 Z\n"], ["run_at", "2014-11-04 14:43:17.595293"], ["updated_at", "2014-11-04 14:43:07.608570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:43:07.615802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 14:43:07.619774"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:43:07.625675"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:43:07.632573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 14:43:07.636941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:43:07.642632"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 14:43:07.000000000 Z\n updated_at: 2014-11-04 14:43:07.636941000 Z\n"], ["run_at", "2014-11-04 14:43:17.638604"], ["updated_at", "2014-11-04 14:43:07.642632"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bf4aa72404fb1baecc31c7d60d950242' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:07.663702"], ["extension", "txt"], ["name", "Test"], ["token", "bf4aa72404fb1baecc31c7d60d950242"], ["updated_at", "2014-11-04 14:43:07.663702"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '33dcb039e6b37f9b67dee4d7d7101e39' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:07.667596"], ["extension", "txt"], ["name", "Test"], ["token", "33dcb039e6b37f9b67dee4d7d7101e39"], ["updated_at", "2014-11-04 14:43:07.667596"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bb815046988d5b202e988ee33c9e6759' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:07.673628"], ["extension", "txt"], ["name", "Test"], ["token", "bb815046988d5b202e988ee33c9e6759"], ["updated_at", "2014-11-04 14:43:07.673628"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd3e87d331d4e8505032a6e89615c0cad' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:07.677403"], ["extension", "txt"], ["name", "Test"], ["token", "d3e87d331d4e8505032a6e89615c0cad"], ["updated_at", "2014-11-04 14:43:07.677403"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '88c1ce5b6339dc27a174a5b7af974c91' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:07.680513"], ["extension", "txt"], ["name", "Test"], ["token", "88c1ce5b6339dc27a174a5b7af974c91"], ["updated_at", "2014-11-04 14:43:07.680513"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 68463692) Fixture Insert (8.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:43:32', '2014-11-04 14:43:32', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '40bc689364b2456941ce561a5598d862' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:32.668666"], ["extension", "txt"], ["name", "Test"], ["token", "40bc689364b2456941ce561a5598d862"], ["updated_at", "2014-11-04 14:43:32.668666"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '953138d8f1ea8e2f491ee69bf2ac730f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:32.672362"], ["extension", "txt"], ["name", "Test"], ["token", "953138d8f1ea8e2f491ee69bf2ac730f"], ["updated_at", "2014-11-04 14:43:32.672362"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '322fd9f2a369fbac8718516360e3ab82' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:32.683313"], ["extension", "txt"], ["name", "Test"], ["token", "322fd9f2a369fbac8718516360e3ab82"], ["updated_at", "2014-11-04 14:43:32.683313"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'af62100a836ec80a0ec645eb5a735afc' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:32.689120"], ["extension", "txt"], ["name", "Test"], ["token", "af62100a836ec80a0ec645eb5a735afc"], ["updated_at", "2014-11-04 14:43:32.689120"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '37859e348a0561728195c645c21ae6ad' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:43:32.693958"], ["extension", "txt"], ["name", "Test"], ["token", "37859e348a0561728195c645c21ae6ad"], ["updated_at", "2014-11-04 14:43:32.693958"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:43:38', '2014-11-04 14:43:38', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:45:20', '2014-11-04 14:45:20', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:45:32', '2014-11-04 14:45:32', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:46:22', '2014-11-04 14:46:22', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:46:55', '2014-11-04 14:46:55', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:48:04', '2014-11-04 14:48:04', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:51:46', '2014-11-04 14:51:46', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:52:16', '2014-11-04 14:52:16', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:58:30', '2014-11-04 14:58:30', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:58:58', '2014-11-04 14:58:58', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 14:58:58.268547"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:58:58.278978"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 14:58:58.278813"], ["updated_at", "2014-11-04 14:58:58.278978"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 14:59:07', '2014-11-04 14:59:07', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '029bc92fe6285f38f30745ed10acbd24' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:59:07.687678"], ["extension", "txt"], ["name", "Test"], ["token", "029bc92fe6285f38f30745ed10acbd24"], ["updated_at", "2014-11-04 14:59:07.687678"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6739efcc8c93ead9483e3a478a0e3848' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:59:07.691120"], ["extension", "txt"], ["name", "Test"], ["token", "6739efcc8c93ead9483e3a478a0e3848"], ["updated_at", "2014-11-04 14:59:07.691120"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a754c361c311ea3bf17de8f6a58d3262' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:59:07.697808"], ["extension", "txt"], ["name", "Test"], ["token", "a754c361c311ea3bf17de8f6a58d3262"], ["updated_at", "2014-11-04 14:59:07.697808"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3868354afc5d8a79005c90421f48e555' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:59:07.701040"], ["extension", "txt"], ["name", "Test"], ["token", "3868354afc5d8a79005c90421f48e555"], ["updated_at", "2014-11-04 14:59:07.701040"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3f40c46570bb6f1cd751095d7e757f60' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 14:59:07.704440"], ["extension", "txt"], ["name", "Test"], ["token", "3f40c46570bb6f1cd751095d7e757f60"], ["updated_at", "2014-11-04 14:59:07.704440"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 14:59:07.717521"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 14:59:07.724318"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:59:07.734924"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 14:59:07.734741"], ["updated_at", "2014-11-04 14:59:07.734924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:59:07.739813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 14:59:07.743589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:59:07.747852"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 14:59:07.000000000 Z\n updated_at: 2014-11-04 14:59:07.743589000 Z\n"], ["run_at", "2014-11-04 14:59:17.744822"], ["updated_at", "2014-11-04 14:59:07.747852"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:59:07.751558"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 14:59:07.753991"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:59:07.758309"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 14:59:07.761988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 14:59:07.764056"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:59:07.767206"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 14:59:07.000000000 Z\n updated_at: 2014-11-04 14:59:07.764056000 Z\n"], ["run_at", "2014-11-04 14:59:17.764740"], ["updated_at", "2014-11-04 14:59:07.767206"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 14:59:07.787885"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 14:59:07.790257"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 14:59:07.790199"], ["updated_at", "2014-11-04 14:59:07.790257"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:00:22', '2014-11-04 15:00:22', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:00:22.707042"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:00:22.712251"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:00:22.725118"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:00:22.000000000 Z\n updated_at: 2014-11-04 15:00:22.712251000 Z\n"], ["run_at", "2014-11-04 15:00:32.713942"], ["updated_at", "2014-11-04 15:00:22.725118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:00:22.730232"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:00:22.733227"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:00:22.736892"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:00:22.741024"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:00:22.743186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:00:22.746382"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:00:22.000000000 Z\n updated_at: 2014-11-04 15:00:22.743186000 Z\n"], ["run_at", "2014-11-04 15:00:32.743857"], ["updated_at", "2014-11-04 15:00:22.746382"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '712d8b55ebc1d0fd9013fdef377d3554' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:00:22.759741"], ["extension", "txt"], ["name", "Test"], ["token", "712d8b55ebc1d0fd9013fdef377d3554"], ["updated_at", "2014-11-04 15:00:22.759741"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5bd43095efe7e77d5c269bacb64ad2e9' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:00:22.762803"], ["extension", "txt"], ["name", "Test"], ["token", "5bd43095efe7e77d5c269bacb64ad2e9"], ["updated_at", "2014-11-04 15:00:22.762803"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '04c7a42e617124eca6e3b612aa11b4e1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:00:22.767018"], ["extension", "txt"], ["name", "Test"], ["token", "04c7a42e617124eca6e3b612aa11b4e1"], ["updated_at", "2014-11-04 15:00:22.767018"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b2af4a7849e4c0f0cf11b2d25c3c8e71' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:00:22.769363"], ["extension", "txt"], ["name", "Test"], ["token", "b2af4a7849e4c0f0cf11b2d25c3c8e71"], ["updated_at", "2014-11-04 15:00:22.769363"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '240cfc2cc2cc1b4fa62889859782477a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:00:22.772766"], ["extension", "txt"], ["name", "Test"], ["token", "240cfc2cc2cc1b4fa62889859782477a"], ["updated_at", "2014-11-04 15:00:22.772766"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:00:22.786585"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:00:22.792325"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:00:22.794744"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:00:22.794678"], ["updated_at", "2014-11-04 15:00:22.794744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:00:22.808032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:00:22.818212"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:00:22.818135"], ["updated_at", "2014-11-04 15:00:22.818212"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:01:34', '2014-11-04 15:01:34', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:01:34.506272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:01:34.518755"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:01:34.518623"], ["updated_at", "2014-11-04 15:01:34.518755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:02:00.512548"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:02:00.515853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:02:00.520642"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:01:34.000000000 Z\n updated_at: 2014-11-04 15:02:00.515853000 Z\n"], ["run_at", "2014-11-04 15:02:10.517638"], ["updated_at", "2014-11-04 15:02:00.520642"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (4.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:02:00.529086"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:02:00.532057"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:02:00.535410"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:02:00.538673"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:02:00.540875"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:02:00.544246"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:01:34.000000000 Z\n updated_at: 2014-11-04 15:02:00.540875000 Z\n"], ["run_at", "2014-11-04 15:02:10.541548"], ["updated_at", "2014-11-04 15:02:00.544246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4876963a83e8060cec71a025dbd2d6bb' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:02:00.552161"], ["extension", "txt"], ["name", "Test"], ["token", "4876963a83e8060cec71a025dbd2d6bb"], ["updated_at", "2014-11-04 15:02:00.552161"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '023ce33643b3700dc659525e25aa07d1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:02:00.555923"], ["extension", "txt"], ["name", "Test"], ["token", "023ce33643b3700dc659525e25aa07d1"], ["updated_at", "2014-11-04 15:02:00.555923"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c4a42ce478f645561563afc6ac0f0400' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:02:00.561916"], ["extension", "txt"], ["name", "Test"], ["token", "c4a42ce478f645561563afc6ac0f0400"], ["updated_at", "2014-11-04 15:02:00.561916"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '76f53a6aff7e8b27195683921c1c666d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:02:00.565705"], ["extension", "txt"], ["name", "Test"], ["token", "76f53a6aff7e8b27195683921c1c666d"], ["updated_at", "2014-11-04 15:02:00.565705"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2d08639fdcaf87fb151f1454a6b7ca6a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:02:00.569356"], ["extension", "txt"], ["name", "Test"], ["token", "2d08639fdcaf87fb151f1454a6b7ca6a"], ["updated_at", "2014-11-04 15:02:00.569356"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:02:00.582873"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:02:00.587297"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:02:00.589799"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:02:00.589697"], ["updated_at", "2014-11-04 15:02:00.589799"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  SQL (4.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (1.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:05:23', '2014-11-04 15:05:23', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:05:23.323824"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:23.336517"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:05:23.336285"], ["updated_at", "2014-11-04 15:05:23.336517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:23.348831"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:05:23.351740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:23.356726"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:05:23.000000000 Z\n updated_at: 2014-11-04 15:05:23.351740000 Z\n"], ["run_at", "2014-11-04 15:05:33.353790"], ["updated_at", "2014-11-04 15:05:23.356726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:23.360386"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:05:23.362975"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:23.367009"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:23.370748"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:05:23.373298"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:23.378238"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:05:23.000000000 Z\n updated_at: 2014-11-04 15:05:23.373298000 Z\n"], ["run_at", "2014-11-04 15:05:33.374426"], ["updated_at", "2014-11-04 15:05:23.378238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "images"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:05:30.501979"], ["name", "test"], ["updated_at", "2014-11-04 15:05:30.501979"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b8f451f80f89dfb5a65d88bdbab9277b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:05:30.509169"], ["extension", "txt"], ["name", "Test"], ["token", "b8f451f80f89dfb5a65d88bdbab9277b"], ["updated_at", "2014-11-04 15:05:30.509169"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4963c8002e4a9b8ec3910180ec1f6e1f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:05:30.512199"], ["extension", "txt"], ["name", "Test"], ["token", "4963c8002e4a9b8ec3910180ec1f6e1f"], ["updated_at", "2014-11-04 15:05:30.512199"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9f35e0a80fa0417617dac1d23cc8ff05' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:05:30.516939"], ["extension", "txt"], ["name", "Test"], ["token", "9f35e0a80fa0417617dac1d23cc8ff05"], ["updated_at", "2014-11-04 15:05:30.516939"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f8f88cb602976c8b94b0a03acde5efdb' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:05:30.519642"], ["extension", "txt"], ["name", "Test"], ["token", "f8f88cb602976c8b94b0a03acde5efdb"], ["updated_at", "2014-11-04 15:05:30.519642"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd7bef9bbfee1eab2f04fd68034e674c5' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:05:30.524253"], ["extension", "txt"], ["name", "Test"], ["token", "d7bef9bbfee1eab2f04fd68034e674c5"], ["updated_at", "2014-11-04 15:05:30.524253"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:05:30.539372"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:05:30.544362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:30.547175"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:05:30.547086"], ["updated_at", "2014-11-04 15:05:30.547175"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:05:56', '2014-11-04 15:05:56', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:56.461113"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:05:56.466114"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:56.479709"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:05:56.000000000 Z\n updated_at: 2014-11-04 15:05:56.466114000 Z\n"], ["run_at", "2014-11-04 15:06:06.467901"], ["updated_at", "2014-11-04 15:05:56.479709"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:56.484018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:05:56.486619"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (3.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:56.492870"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (3.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:05:56.499528"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:05:56.501622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:56.505036"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:05:56.000000000 Z\n updated_at: 2014-11-04 15:05:56.501622000 Z\n"], ["run_at", "2014-11-04 15:06:06.502305"], ["updated_at", "2014-11-04 15:05:56.505036"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (3.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:05:56.525486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:05:56.528397"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:05:56.528328"], ["updated_at", "2014-11-04 15:05:56.528397"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:06:29.876965"], ["name", "test"], ["updated_at", "2014-11-04 15:06:29.876965"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5fd5ab451caf04dff6628bce72ae2a92' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:06:29.888496"], ["extension", "txt"], ["name", "Test"], ["token", "5fd5ab451caf04dff6628bce72ae2a92"], ["updated_at", "2014-11-04 15:06:29.888496"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fb793b6b69ce27662dd0c970344a9a9d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:06:29.891625"], ["extension", "txt"], ["name", "Test"], ["token", "fb793b6b69ce27662dd0c970344a9a9d"], ["updated_at", "2014-11-04 15:06:29.891625"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '45ef0d6064926a0239d0f425b3c0a7ba' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:06:29.899097"], ["extension", "txt"], ["name", "Test"], ["token", "45ef0d6064926a0239d0f425b3c0a7ba"], ["updated_at", "2014-11-04 15:06:29.899097"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f31ba30fab74180baeb2272ed748c8d9' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:06:29.905119"], ["extension", "txt"], ["name", "Test"], ["token", "f31ba30fab74180baeb2272ed748c8d9"], ["updated_at", "2014-11-04 15:06:29.905119"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bbe93c426027bc0664dc1cb875791ee4' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:06:29.914290"], ["extension", "txt"], ["name", "Test"], ["token", "bbe93c426027bc0664dc1cb875791ee4"], ["updated_at", "2014-11-04 15:06:29.914290"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:06:29.931274"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:06:29.943814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:06:29.948696"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:06:29.948600"], ["updated_at", "2014-11-04 15:06:29.948696"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:08:54', '2014-11-04 15:08:54', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:08:55.008605"], ["name", "test"], ["updated_at", "2014-11-04 15:08:55.008605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (1.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '543d06f12ee6aedae818c78b7175c251' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:08:55.027441"], ["extension", "txt"], ["name", "Test"], ["token", "543d06f12ee6aedae818c78b7175c251"], ["updated_at", "2014-11-04 15:08:55.027441"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3cd2de8a80e3758a9bbce049aa671cdc' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:08:55.035851"], ["extension", "txt"], ["name", "Test"], ["token", "3cd2de8a80e3758a9bbce049aa671cdc"], ["updated_at", "2014-11-04 15:08:55.035851"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '88602037c128d50e8e38c369eac45905' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:08:55.044651"], ["extension", "txt"], ["name", "Test"], ["token", "88602037c128d50e8e38c369eac45905"], ["updated_at", "2014-11-04 15:08:55.044651"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ec724af468b83ce99fe77088905f95a0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:08:55.047484"], ["extension", "txt"], ["name", "Test"], ["token", "ec724af468b83ce99fe77088905f95a0"], ["updated_at", "2014-11-04 15:08:55.047484"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3159a922d60c3898dc8b248993c2b47a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:08:55.054035"], ["extension", "txt"], ["name", "Test"], ["token", "3159a922d60c3898dc8b248993c2b47a"], ["updated_at", "2014-11-04 15:08:55.054035"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:08:55.076203"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:08:55.089002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:08:55.100424"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:08:55.100249"], ["updated_at", "2014-11-04 15:08:55.100424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:08:55.110280"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:08:55.114136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:08:55.121744"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:08:54.000000000 Z\n updated_at: 2014-11-04 15:08:55.114136000 Z\n"], ["run_at", "2014-11-04 15:09:05.115778"], ["updated_at", "2014-11-04 15:08:55.121744"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:08:55.127927"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (10.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:08:55.143937"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:08:55.148211"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:08:55.152572"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:08:55.156271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:08:55.161229"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:08:54.000000000 Z\n updated_at: 2014-11-04 15:08:55.156271000 Z\n"], ["run_at", "2014-11-04 15:09:05.157429"], ["updated_at", "2014-11-04 15:08:55.161229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:08:55.171358"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:08:55.173862"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:08:55.173790"], ["updated_at", "2014-11-04 15:08:55.173862"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:10:38', '2014-11-04 15:10:38', 591498715)  (4.8ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:10:38.921717"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:10:38.933619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:10:38.951305"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:10:38.000000000 Z\n updated_at: 2014-11-04 15:10:38.933619000 Z\n"], ["run_at", "2014-11-04 15:10:48.935645"], ["updated_at", "2014-11-04 15:10:38.951305"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:10:38.960096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:10:38.966332"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:10:38.972483"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:10:38.978680"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:10:38.983128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:10:38.988830"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:10:38.000000000 Z\n updated_at: 2014-11-04 15:10:38.983128000 Z\n"], ["run_at", "2014-11-04 15:10:48.984457"], ["updated_at", "2014-11-04 15:10:38.988830"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:10:39.006187"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:10:39.013448"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:10:39.013217"], ["updated_at", "2014-11-04 15:10:39.013448"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:10:39.046602"], ["name", "test"], ["updated_at", "2014-11-04 15:10:39.046602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2efe29bf50066eed924e52f55acccbb7' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:10:39.056735"], ["extension", "txt"], ["name", "Test"], ["token", "2efe29bf50066eed924e52f55acccbb7"], ["updated_at", "2014-11-04 15:10:39.056735"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e78c680c3e12832746e033160f6a348b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:10:39.063970"], ["extension", "txt"], ["name", "Test"], ["token", "e78c680c3e12832746e033160f6a348b"], ["updated_at", "2014-11-04 15:10:39.063970"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cdcd8547910a89be6e0c7e52bb4cf22f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:10:39.071165"], ["extension", "txt"], ["name", "Test"], ["token", "cdcd8547910a89be6e0c7e52bb4cf22f"], ["updated_at", "2014-11-04 15:10:39.071165"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6a5a0be5aee511782bc91a1c66d37bbf' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:10:39.076740"], ["extension", "txt"], ["name", "Test"], ["token", "6a5a0be5aee511782bc91a1c66d37bbf"], ["updated_at", "2014-11-04 15:10:39.076740"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '726074aee4324157a4f413008797a7cc' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:10:39.090570"], ["extension", "txt"], ["name", "Test"], ["token", "726074aee4324157a4f413008797a7cc"], ["updated_at", "2014-11-04 15:10:39.090570"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:10:39.108138"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:10:39.118169"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:10:39.125393"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:10:39.125191"], ["updated_at", "2014-11-04 15:10:39.125393"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:12:03', '2014-11-04 15:12:03', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:12:03.556402"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:12:03.571402"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:12:03.571268"], ["updated_at", "2014-11-04 15:12:03.571402"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:12:03.602712"], ["name", "test"], ["updated_at", "2014-11-04 15:12:03.602712"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '207c7269de6b3663a4850897a0ea1d61' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:12:03.617287"], ["extension", "txt"], ["name", "Test"], ["token", "207c7269de6b3663a4850897a0ea1d61"], ["updated_at", "2014-11-04 15:12:03.617287"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2b4e85d5ffad5c8deaf8e36db4e94265' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:12:03.625976"], ["extension", "txt"], ["name", "Test"], ["token", "2b4e85d5ffad5c8deaf8e36db4e94265"], ["updated_at", "2014-11-04 15:12:03.625976"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2b6bc4cc7ac6bdfc605d15a3ae973ce2' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:12:03.633577"], ["extension", "txt"], ["name", "Test"], ["token", "2b6bc4cc7ac6bdfc605d15a3ae973ce2"], ["updated_at", "2014-11-04 15:12:03.633577"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '733f4c98de1cd38311961faf017e986b' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:12:03.641295"], ["extension", "txt"], ["name", "Test"], ["token", "733f4c98de1cd38311961faf017e986b"], ["updated_at", "2014-11-04 15:12:03.641295"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '979622e1a12c9cad3b654cbed7a160bf' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:12:03.647633"], ["extension", "txt"], ["name", "Test"], ["token", "979622e1a12c9cad3b654cbed7a160bf"], ["updated_at", "2014-11-04 15:12:03.647633"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:12:03.660353"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:12:03.667527"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:12:03.673176"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:12:03.673066"], ["updated_at", "2014-11-04 15:12:03.673176"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:12:03.677426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:12:03.680281"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:12:03.683857"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:12:03.000000000 Z\n updated_at: 2014-11-04 15:12:03.680281000 Z\n"], ["run_at", "2014-11-04 15:12:13.681161"], ["updated_at", "2014-11-04 15:12:03.683857"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:12:03.696898"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:12:03.702333"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:12:03.709414"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:12:03.714530"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:12:03.719856"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:12:03.724747"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:12:03.000000000 Z\n updated_at: 2014-11-04 15:12:03.719856000 Z\n"], ["run_at", "2014-11-04 15:12:13.721556"], ["updated_at", "2014-11-04 15:12:03.724747"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:12:37', '2014-11-04 15:12:37', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:12:37.133343"], ["name", "test"], ["updated_at", "2014-11-04 15:12:37.133343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.5ms) DROP TABLE "images" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104135257'  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:13:26', '2014-11-04 15:13:26', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:13:26.157821"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:13:26.157821"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:13:26.163028"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:13:26.163028"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:13:26.165853"], ["name", "test"], ["updated_at", "2014-11-04 15:13:26.165853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:14:09', '2014-11-04 15:14:09', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 15:14:09.296405"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:14:09.319255"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:14:09.319255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:14:09.323520"], ["name", "test"], ["updated_at", "2014-11-04 15:14:09.323520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:14:14', '2014-11-04 15:14:14', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:14:14.334429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:14:14.345708"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:14:14.367145"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:14:14.000000000 Z\n updated_at: 2014-11-04 15:14:14.345708000 Z\n"], ["run_at", "2014-11-04 15:14:24.349404"], ["updated_at", "2014-11-04 15:14:14.367145"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:14:14.374575"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:14:14.379009"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:14:14.386195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:14:14.393672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:14:14.396521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:14:14.401628"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:14:14.000000000 Z\n updated_at: 2014-11-04 15:14:14.396521000 Z\n"], ["run_at", "2014-11-04 15:14:24.397590"], ["updated_at", "2014-11-04 15:14:14.401628"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:14:14.414918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:14:14.421044"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:14:14.420950"], ["updated_at", "2014-11-04 15:14:14.421044"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 15:14:14.445768"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:14:14.471096"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:14:14.471096"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:14:14.479844"], ["name", "test"], ["updated_at", "2014-11-04 15:14:14.479844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '12161ec95f0b04816675885c10050265' LIMIT 1 SQL (1.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:14:14.495529"], ["extension", "txt"], ["name", "Test"], ["token", "12161ec95f0b04816675885c10050265"], ["updated_at", "2014-11-04 15:14:14.495529"], ["uploading", "f"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '129c8f83263b51658453b32ffe1bfdda' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:14:14.506913"], ["extension", "txt"], ["name", "Test"], ["token", "129c8f83263b51658453b32ffe1bfdda"], ["updated_at", "2014-11-04 15:14:14.506913"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c5472235245229cddbc48861f28512ee' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:14:14.537180"], ["extension", "txt"], ["name", "Test"], ["token", "c5472235245229cddbc48861f28512ee"], ["updated_at", "2014-11-04 15:14:14.537180"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1bd7d6d03d08d55c8412a39da1abc864' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:14:14.543510"], ["extension", "txt"], ["name", "Test"], ["token", "1bd7d6d03d08d55c8412a39da1abc864"], ["updated_at", "2014-11-04 15:14:14.543510"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ee0d838f037dce5f06395fbafe29777e' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:14:14.552546"], ["extension", "txt"], ["name", "Test"], ["token", "ee0d838f037dce5f06395fbafe29777e"], ["updated_at", "2014-11-04 15:14:14.552546"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:14:14.573810"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:14:14.584332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:14:14.590851"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:14:14.590656"], ["updated_at", "2014-11-04 15:14:14.590851"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:15:05', '2014-11-04 15:15:05', 591498715)  (5.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.4ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:05.770963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:15:05.781692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:05.803876"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:15:05.000000000 Z\n updated_at: 2014-11-04 15:15:05.781692000 Z\n"], ["run_at", "2014-11-04 15:15:15.784544"], ["updated_at", "2014-11-04 15:15:05.803876"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:05.824400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:15:05.829440"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:05.841268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:05.850383"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:15:05.858598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:05.864440"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:15:05.000000000 Z\n updated_at: 2014-11-04 15:15:05.858598000 Z\n"], ["run_at", "2014-11-04 15:15:15.860324"], ["updated_at", "2014-11-04 15:15:05.864440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd5ca7cc6b09a17949704e3db115cbec2' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:05.882554"], ["extension", "txt"], ["name", "Test"], ["token", "d5ca7cc6b09a17949704e3db115cbec2"], ["updated_at", "2014-11-04 15:15:05.882554"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '485029811009a11d5979f038819713f4' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:05.891686"], ["extension", "txt"], ["name", "Test"], ["token", "485029811009a11d5979f038819713f4"], ["updated_at", "2014-11-04 15:15:05.891686"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3e7d41197224bf5170de5b9dcb350457' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:05.904682"], ["extension", "txt"], ["name", "Test"], ["token", "3e7d41197224bf5170de5b9dcb350457"], ["updated_at", "2014-11-04 15:15:05.904682"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '04ead6e69b2ae072a08bade8db8064dd' LIMIT 1 SQL (1.0ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:05.911428"], ["extension", "txt"], ["name", "Test"], ["token", "04ead6e69b2ae072a08bade8db8064dd"], ["updated_at", "2014-11-04 15:15:05.911428"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fd47fe06dbb0a3d76030e78822de4f07' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:05.922296"], ["extension", "txt"], ["name", "Test"], ["token", "fd47fe06dbb0a3d76030e78822de4f07"], ["updated_at", "2014-11-04 15:15:05.922296"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:15:05.945908"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:15:05.956424"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:05.963075"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:15:05.962866"], ["updated_at", "2014-11-04 15:15:05.963075"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:15:05.978788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:05.985221"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:15:05.984909"], ["updated_at", "2014-11-04 15:15:05.985221"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 15:15:06.004498"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:06.019078"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:15:06.019078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:15:06.025129"], ["name", "test"], ["updated_at", "2014-11-04 15:15:06.025129"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:15:58', '2014-11-04 15:15:58', 591498715)  (4.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a59465d1bd7bbaa89b312007516e0df3' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:58.632134"], ["extension", "txt"], ["name", "Test"], ["token", "a59465d1bd7bbaa89b312007516e0df3"], ["updated_at", "2014-11-04 15:15:58.632134"], ["uploading", "f"]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c37ba34a1d21f07b31159ea130bf1e83' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:58.645144"], ["extension", "txt"], ["name", "Test"], ["token", "c37ba34a1d21f07b31159ea130bf1e83"], ["updated_at", "2014-11-04 15:15:58.645144"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (2.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7a60c729e7dee0b137276ce5af393749' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:58.659766"], ["extension", "txt"], ["name", "Test"], ["token", "7a60c729e7dee0b137276ce5af393749"], ["updated_at", "2014-11-04 15:15:58.659766"], ["uploading", "f"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f7ab080c4ede5c199f872ceadd3102a8' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:58.668123"], ["extension", "txt"], ["name", "Test"], ["token", "f7ab080c4ede5c199f872ceadd3102a8"], ["updated_at", "2014-11-04 15:15:58.668123"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '28a02295eee4e08e6341c6eafcf957bc' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:15:58.677519"], ["extension", "txt"], ["name", "Test"], ["token", "28a02295eee4e08e6341c6eafcf957bc"], ["updated_at", "2014-11-04 15:15:58.677519"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.3ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:15:58.704922"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:15:58.718008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:58.735584"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:15:58.735277"], ["updated_at", "2014-11-04 15:15:58.735584"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:15:58.749995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:58.755457"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:15:58.755347"], ["updated_at", "2014-11-04 15:15:58.755457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:58.766168"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:15:58.770842"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:58.779690"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:15:58.000000000 Z\n updated_at: 2014-11-04 15:15:58.770842000 Z\n"], ["run_at", "2014-11-04 15:16:08.773585"], ["updated_at", "2014-11-04 15:15:58.779690"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:58.790912"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:15:58.798120"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.1ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:58.811913"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:15:58.823033"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:15:58.829450"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:58.836302"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:15:58.000000000 Z\n updated_at: 2014-11-04 15:15:58.829450000 Z\n"], ["run_at", "2014-11-04 15:16:08.832297"], ["updated_at", "2014-11-04 15:15:58.836302"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 15:15:58.867549"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:15:58.879059"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:15:58.879059"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:15:58.884650"], ["name", "test"], ["updated_at", "2014-11-04 15:15:58.884650"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:16:50', '2014-11-04 15:16:50', 591498715)  (4.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:16:50.345956"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:16:50.364344"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:16:50.364138"], ["updated_at", "2014-11-04 15:16:50.364344"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:16:50.393301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:16:50.397460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:16:50.403200"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:16:50.000000000 Z\n updated_at: 2014-11-04 15:16:50.397460000 Z\n"], ["run_at", "2014-11-04 15:17:00.399447"], ["updated_at", "2014-11-04 15:16:50.403200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:16:50.409491"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:16:50.416026"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:16:50.423831"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:16:50.431173"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:16:50.436473"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:16:50.446518"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:16:50.000000000 Z\n updated_at: 2014-11-04 15:16:50.436473000 Z\n"], ["run_at", "2014-11-04 15:17:00.439085"], ["updated_at", "2014-11-04 15:16:50.446518"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1585f83a37186ffd0b3dec4e62cb313c' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:16:50.463526"], ["extension", "txt"], ["name", "Test"], ["token", "1585f83a37186ffd0b3dec4e62cb313c"], ["updated_at", "2014-11-04 15:16:50.463526"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '03eb2e8d5c6c4959a16c0f7e6a082397' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:16:50.470983"], ["extension", "txt"], ["name", "Test"], ["token", "03eb2e8d5c6c4959a16c0f7e6a082397"], ["updated_at", "2014-11-04 15:16:50.470983"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '07e300d94aef62224984c66c33edbd35' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:16:50.481130"], ["extension", "txt"], ["name", "Test"], ["token", "07e300d94aef62224984c66c33edbd35"], ["updated_at", "2014-11-04 15:16:50.481130"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '73356e207367937d17db006a980d7825' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:16:50.487229"], ["extension", "txt"], ["name", "Test"], ["token", "73356e207367937d17db006a980d7825"], ["updated_at", "2014-11-04 15:16:50.487229"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '446e4078856e3dedf45e305850f74a16' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:16:50.494034"], ["extension", "txt"], ["name", "Test"], ["token", "446e4078856e3dedf45e305850f74a16"], ["updated_at", "2014-11-04 15:16:50.494034"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:16:50.519132"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:16:50.549428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:16:50.555331"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:16:50.555143"], ["updated_at", "2014-11-04 15:16:50.555331"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 15:16:50.571879"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:16:50.585823"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:16:50.585823"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:16:50.591613"], ["name", "test"], ["updated_at", "2014-11-04 15:16:50.591613"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (4.8ms) commit transaction Migrating to CreateMovieResources (20141104152345)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.0ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:29:02', '2014-11-04 15:29:02', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:29:02.142853"], ["name", "test"], ["updated_at", "2014-11-04 15:29:02.142853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (3.2ms) rollback transaction  (0.4ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:29:20', '2014-11-04 15:29:20', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieResources (20141104152345)  (0.1ms) begin transaction  (0.4ms) DROP TABLE "movie_resources" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104152345'  (4.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieResources (20141104152345)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.1ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_movie_id' AND type='index'   (0.5ms) CREATE INDEX "index_movie_resources_on_resource_id" ON "movie_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'   (0.4ms) SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_resource_id' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_movie_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:30:30', '2014-11-04 15:30:30', 591498715)  (4.7ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:32:40', '2014-11-04 15:32:40', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieResources (20141104152345) ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieResources (20141104152345)  (0.1ms) begin transaction  (0.4ms) DROP TABLE "movie_resources" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104152345'  (4.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.0ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (4.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.0ms) begin transaction  (0.5ms) DROP TABLE "movie_fogged_resources" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104152345'  (4.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.0ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (4.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:36:46', '2014-11-04 15:36:46', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.0ms) begin transaction  (0.5ms) DROP TABLE "movie_fogged_resources" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104152345'  (4.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMoviesFoggedResources (20141104152345)  (0.0ms) begin transaction  (0.4ms) CREATE TABLE "movies_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.0ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_movies_fogged_resources_on_movie_id" ON "movies_fogged_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movies_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movies_fogged_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movies_fogged_resources_on_resource_id" ON "movies_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movies_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movies_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movies_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movies_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:38:10', '2014-11-04 15:38:10', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMoviesFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.6ms) DROP TABLE "movies_fogged_resources" SQL (0.2ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104152345'  (4.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:40:21', '2014-11-04 15:40:21', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:40:32', '2014-11-04 15:40:32', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:40:48', '2014-11-04 15:40:48', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:40:48.284224"], ["name", "test"], ["updated_at", "2014-11-04 15:40:48.284224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:40:56', '2014-11-04 15:40:56', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:40:56.909759"], ["name", "test"], ["updated_at", "2014-11-04 15:40:56.909759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:42:26', '2014-11-04 15:42:26', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:42:26.281831"], ["name", "test"], ["updated_at", "2014-11-04 15:42:26.281831"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:42:26.303526"], ["name", "test"], ["updated_at", "2014-11-04 15:42:26.303526"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:26.306238"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:42:26.306238"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:26.308321"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:42:26.308321"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:42:43', '2014-11-04 15:42:43', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:42:43.898307"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:42:43.906383"], ["name", "test"], ["updated_at", "2014-11-04 15:42:43.906383"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:43.908863"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:42:43.908863"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:43.911281"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:42:43.911281"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:43.913418"], ["movie_id", 1], ["resource_id", 431685987], ["updated_at", "2014-11-04 15:42:43.913418"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:42:43.921659"], ["name", "test"], ["updated_at", "2014-11-04 15:42:43.921659"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:42:43.931497"], ["name", "test"], ["updated_at", "2014-11-04 15:42:43.931497"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:43.935452"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:42:43.935452"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:42:43.938226"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:42:43.938226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:43:19', '2014-11-04 15:43:19', 591498715)  (4.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:43:20.057357"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:43:20.066675"], ["name", "test"], ["updated_at", "2014-11-04 15:43:20.066675"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:43:20.068437"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:43:20.068437"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:43:20.069500"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:43:20.069500"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:43:20.071265"], ["movie_id", 1], ["resource_id", 431685987], ["updated_at", "2014-11-04 15:43:20.071265"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:43:31', '2014-11-04 15:43:31', 591498715)  (4.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:43:31.253951"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:43:59.689616"], ["name", "test"], ["updated_at", "2014-11-04 15:43:59.689616"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:43:59.692157"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:43:59.692157"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:43:59.693345"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:43:59.693345"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:43:59.694220"], ["movie_id", 1], ["resource_id", 431685987], ["updated_at", "2014-11-04 15:43:59.694220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:44:44', '2014-11-04 15:44:44', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:44:44.849440"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:44:44.853475"], ["name", "test"], ["updated_at", "2014-11-04 15:44:44.853475"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:44:44.854711"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:44:44.854711"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:44:44.855832"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:44:44.855832"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:44:44.856598"], ["movie_id", 1], ["resource_id", 431685987], ["updated_at", "2014-11-04 15:44:44.856598"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:45:04', '2014-11-04 15:45:04', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:45:04.937442"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (4.8ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:46:10.477863"], ["name", "test"], ["updated_at", "2014-11-04 15:46:10.477863"]] SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:46:10.484730"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:46:10.484730"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:46:10.486415"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:46:10.486415"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:46:10.487200"], ["movie_id", 1], ["resource_id", 431685987], ["updated_at", "2014-11-04 15:46:10.487200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:49:10', '2014-11-04 15:49:10', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:49:11.061721"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Unable to load movie_resource, underlying cause No such file to load -- movie_resource /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:348:in `require_or_load' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:307:in `depend_on' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:225:in `require_dependency' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:862:in `try_to_load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:881:in `block in require_fixture_classes' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:879:in `each' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:879:in `require_fixture_classes' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:857:in `fixtures' /Users/david/projects/fogged/test/integration/navigation_test.rb:4:in `' /Users/david/projects/fogged/test/integration/navigation_test.rb:3:in `' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in
' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:9:in `each' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:9:in `block in
' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:in `select' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:in `
'  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 15:49:35', '2014-11-04 15:49:35', 591498715)  (0.7ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:49:35.213952"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.235186"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:49:35.234866"], ["updated_at", "2014-11-04 15:49:35.235186"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:49:35.253444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (2.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:49:35.258973"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.271568"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:49:35.000000000 Z\n updated_at: 2014-11-04 15:49:35.258973000 Z\n"], ["run_at", "2014-11-04 15:49:45.262916"], ["updated_at", "2014-11-04 15:49:35.271568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:49:35.278131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 15:49:35.285109"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:49:35.296622"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 15:49:35.303822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 15:49:35.308685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.312379"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 15:49:35.000000000 Z\n updated_at: 2014-11-04 15:49:35.308685000 Z\n"], ["run_at", "2014-11-04 15:49:45.309744"], ["updated_at", "2014-11-04 15:49:35.312379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd9475daa4c7ad72ac4f66648c5866873' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:49:35.321903"], ["extension", "txt"], ["name", "Test"], ["token", "d9475daa4c7ad72ac4f66648c5866873"], ["updated_at", "2014-11-04 15:49:35.321903"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '030e49c3e7674da918d0252e6f652cb6' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:49:35.327685"], ["extension", "txt"], ["name", "Test"], ["token", "030e49c3e7674da918d0252e6f652cb6"], ["updated_at", "2014-11-04 15:49:35.327685"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '126bb37f1c6d02c23805acc3aaa9713b' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:49:35.339839"], ["extension", "txt"], ["name", "Test"], ["token", "126bb37f1c6d02c23805acc3aaa9713b"], ["updated_at", "2014-11-04 15:49:35.339839"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0a5436a3e609fa934dd3bae808b0f348' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:49:35.347688"], ["extension", "txt"], ["name", "Test"], ["token", "0a5436a3e609fa934dd3bae808b0f348"], ["updated_at", "2014-11-04 15:49:35.347688"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dee92f1dc3d68534fd7f5dcd019dab89' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 15:49:35.357172"], ["extension", "txt"], ["name", "Test"], ["token", "dee92f1dc3d68534fd7f5dcd019dab89"], ["updated_at", "2014-11-04 15:49:35.357172"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 15:49:35.390166"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 15:49:35.402670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.405552"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 15:49:35.405418"], ["updated_at", "2014-11-04 15:49:35.405552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 15:49:35.447263"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:49:35.454488"], ["name", "test"], ["updated_at", "2014-11-04 15:49:35.454488"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:49:35.460964"], ["name", "test"], ["updated_at", "2014-11-04 15:49:35.460964"]] SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.463812"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:49:35.463812"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.467204"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 15:49:35.467204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 15:49:35.477423"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 15:49:35.482648"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 15:49:35.482648"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 15:49:35.485762"], ["name", "test"], ["updated_at", "2014-11-04 15:49:35.485762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Unable to load movie_resource, underlying cause No such file to load -- movie_resource /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:348:in `require_or_load' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:307:in `depend_on' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:225:in `require_dependency' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:862:in `try_to_load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:881:in `block in require_fixture_classes' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:879:in `each' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:879:in `require_fixture_classes' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:857:in `fixtures' /Users/david/projects/fogged/test/integration/navigation_test.rb:4:in `' /Users/david/projects/fogged/test/integration/navigation_test.rb:3:in `' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in
' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:9:in `each' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:9:in `block in
' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:in `select' /Users/david/.gem/ruby/2.1.3/gems/rake-10.3.2/lib/rake/rake_test_loader.rb:4:in `
'  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:33:55', '2014-11-04 16:33:55', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 16:33:55.931082"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:55.940931"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 16:33:55.940789"], ["updated_at", "2014-11-04 16:33:55.940931"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aec5eedcc194483f42df31c6aba01630' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 16:33:55.952335"], ["extension", "txt"], ["name", "Test"], ["token", "aec5eedcc194483f42df31c6aba01630"], ["updated_at", "2014-11-04 16:33:55.952335"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7abe53c2e8988535509fb23b53137148' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 16:33:55.955544"], ["extension", "txt"], ["name", "Test"], ["token", "7abe53c2e8988535509fb23b53137148"], ["updated_at", "2014-11-04 16:33:55.955544"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '764f93ef048488c708c1b07d24e23838' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 16:33:55.961161"], ["extension", "txt"], ["name", "Test"], ["token", "764f93ef048488c708c1b07d24e23838"], ["updated_at", "2014-11-04 16:33:55.961161"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '910bd19c71fad78f4296f6267219ff96' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 16:33:55.964072"], ["extension", "txt"], ["name", "Test"], ["token", "910bd19c71fad78f4296f6267219ff96"], ["updated_at", "2014-11-04 16:33:55.964072"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a13172944194a460f924e46804d7a905' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-04 16:33:55.967428"], ["extension", "txt"], ["name", "Test"], ["token", "a13172944194a460f924e46804d7a905"], ["updated_at", "2014-11-04 16:33:55.967428"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:33:55.979646"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-04 16:33:55.986911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:55.990593"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-04 16:33:55.990491"], ["updated_at", "2014-11-04 16:33:55.990593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 16:33:55.996238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 16:33:55.999112"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:56.010825"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 16:33:55.000000000 Z\n updated_at: 2014-11-04 16:33:55.999112000 Z\n"], ["run_at", "2014-11-04 16:34:06.000069"], ["updated_at", "2014-11-04 16:33:56.010825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 16:33:56.014781"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-04 16:33:56.017378"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 16:33:56.020703"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-04 16:33:56.024427"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-04 16:33:56.026686"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:56.030287"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-04 16:33:55.000000000 Z\n updated_at: 2014-11-04 16:33:56.026686000 Z\n"], ["run_at", "2014-11-04 16:34:06.027411"], ["updated_at", "2014-11-04 16:33:56.030287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-04 16:33:56.064473"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 16:33:56.068637"], ["name", "test"], ["updated_at", "2014-11-04 16:33:56.068637"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 16:33:56.073107"], ["name", "test"], ["updated_at", "2014-11-04 16:33:56.073107"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:56.073985"], ["movie_id", 1], ["resource_id", 701625837], ["updated_at", "2014-11-04 16:33:56.073985"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:56.074930"], ["movie_id", 1], ["resource_id", 819504217], ["updated_at", "2014-11-04 16:33:56.074930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-04 16:33:56.082434"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-04 16:33:56.086433"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-04 16:33:56.086433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-04 16:33:56.088610"], ["name", "test"], ["updated_at", "2014-11-04 16:33:56.088610"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:37:12', '2014-11-04 16:37:12', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:37:40', '2014-11-04 16:37:40', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:39:25', '2014-11-04 16:39:25', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:39:25.855750"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.0ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (2.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:42:24', '2014-11-04 16:42:24', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource --------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:42:52', '2014-11-04 16:42:52', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:42:52.577947"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:43:23', '2014-11-04 16:43:23', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:43:24.011417"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:43:36', '2014-11-04 16:43:36', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:43:36.078512"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:44:33', '2014-11-04 16:44:33', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:44:33.297321"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.1ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:45:00', '2014-11-04 16:45:00', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:45:00.451071"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.1ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:46:32', '2014-11-04 16:46:32', 591498715)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_image_resource -------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:46:32.211282"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.0ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:46:48', '2014-11-04 16:46:48', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:46:48.412289"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:47:01', '2014-11-04 16:47:01', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:47:01.229487"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.9ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:47:51', '2014-11-04 16:47:51', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:47:51.276757"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.8ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:48:40', '2014-11-04 16:48:40', 591498715)  (4.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:48:40.655953"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:48:52', '2014-11-04 16:48:52', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:48:52.581352"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.0ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:49:10', '2014-11-04 16:49:10', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-04 16:49:10.030949"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.7ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:50:04', '2014-11-04 16:50:04', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:50:16', '2014-11-04 16:50:16', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '820e922092c9fd84225e0ffba1c3fcee' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:50:16.538450"], ["extension", "png"], ["name", "Dummy"], ["token", "820e922092c9fd84225e0ffba1c3fcee"], ["updated_at", "2014-11-04 16:50:16.538450"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 2.5ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:50:35', '2014-11-04 16:50:35', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '51d23a2ff9602c63e9cebf3c588ff19f' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:50:35.750283"], ["extension", "png"], ["name", "Dummy"], ["token", "51d23a2ff9602c63e9cebf3c588ff19f"], ["updated_at", "2014-11-04 16:50:35.750283"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 2.1ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:50:52', '2014-11-04 16:50:52', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '87f76f2fb45754db242dc00a0801639e' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:50:52.731467"], ["extension", "png"], ["name", "Dummy"], ["token", "87f76f2fb45754db242dc00a0801639e"], ["updated_at", "2014-11-04 16:50:52.731467"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 2.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:51:25', '2014-11-04 16:51:25', 591498715)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1803adf66ef85b6706149d86fc7e590e' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:51:25.442277"], ["extension", "png"], ["name", "Dummy"], ["token", "1803adf66ef85b6706149d86fc7e590e"], ["updated_at", "2014-11-04 16:51:25.442277"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 2.0ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:51:45', '2014-11-04 16:51:45', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '41f109e7a7f9e9a955779df55994781f' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:51:45.632265"], ["extension", "png"], ["name", "Dummy"], ["token", "41f109e7a7f9e9a955779df55994781f"], ["updated_at", "2014-11-04 16:51:45.632265"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 21ms (Views: 1.6ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:53:06', '2014-11-04 16:53:06', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '20a3bb52c6c721086eb69ab9ea8e7653' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:53:06.241930"], ["extension", "png"], ["name", "Dummy"], ["token", "20a3bb52c6c721086eb69ab9ea8e7653"], ["updated_at", "2014-11-04 16:53:06.241930"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 22ms (Views: 1.6ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:53:25', '2014-11-04 16:53:25', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5663cd4bf99d25197ca1affcaba3915b' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:53:25.522244"], ["extension", "png"], ["name", "Dummy"], ["token", "5663cd4bf99d25197ca1affcaba3915b"], ["updated_at", "2014-11-04 16:53:25.522244"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 21ms (Views: 1.9ms | ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:53:51', '2014-11-04 16:53:51', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'eba929cb30a37dd7276c6d587acc288c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-04 16:53:51.376555"], ["extension", "png"], ["name", "Dummy"], ["token", "eba929cb30a37dd7276c6d587acc288c"], ["updated_at", "2014-11-04 16:53:51.376555"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 18ms (Views: 2.3ms | ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 7ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:55:09', '2014-11-04 16:55:09', 591498715)  (5.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 16:55:16', '2014-11-04 16:55:16', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 17:01:06', '2014-11-04 17:01:06', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 17:02:28', '2014-11-04 17:02:28', 591498715)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-04 17:02:28.413074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 17:09:22', '2014-11-04 17:09:22', 591498715)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_groups ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group_with_search_query_on_name -----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_groups --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_group_id -------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_not_index_resources_as_anonymous --------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-04 17:09:33', '2014-11-04 17:09:33', 591498715)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_groups ------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group --------------------------------------------------------------------- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 06:51:09', '2014-11-05 06:51:09', 591498715)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_groups ------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group_with_search_query_on_name ----------------------------------------------------------------------------------------------- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Unable to load movie_resource, underlying cause No such file to load -- movie_resource /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `block in require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in `load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in `require' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:348:in `require_or_load' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:307:in `depend_on' /Users/david/.gem/ruby/2.1.3/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:225:in `require_dependency' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:862:in `try_to_load_dependency' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:881:in `block in require_fixture_classes' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:879:in `each' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:879:in `require_fixture_classes' /Users/david/.gem/ruby/2.1.3/gems/activerecord-4.1.7/lib/active_record/fixtures.rb:857:in `fixtures' /Users/david/projects/fogged/test/test_helper.rb:28:in `' /Users/david/projects/fogged/test/test_helper.rb:27:in `' test/dummy/test/controllers/resources_controller/index_test.rb:1:in `require' test/dummy/test/controllers/resources_controller/index_test.rb:1:in `
'  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_resources" SQLite3::SQLException: no such table: movie_resources: DELETE FROM "movie_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_resources" SQLite3::SQLException: no such table: movie_resources: DELETE FROM "movie_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_resources" SQLite3::SQLException: no such table: movie_resources: DELETE FROM "movie_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_resources" SQLite3::SQLException: no such table: movie_resources: DELETE FROM "movie_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 591498715) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_resources" SQLite3::SQLException: no such table: movie_resources: DELETE FROM "movie_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:00:42', '2014-11-05 07:00:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_resources" SQLite3::SQLException: no such table: movie_resources: DELETE FROM "movie_resources"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.5ms) DROP TABLE "movie_fogged_resources" SQL (0.1ms) DELETE FROM "schema_migrations" WHERE "schema_migrations"."version" = '20141104152345'  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.0ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:01:47', '2014-11-05 07:01:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:01:47', '2014-11-05 07:01:47', 849405871, 624739301, 819504217) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:01:47', '2014-11-05 07:01:47', 980190962)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_groups ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 980190962]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 980190962]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group_with_search_query_on_name ----------------------------------------------------------------------------------------------- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:02:40', '2014-11-05 07:02:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:02:40', '2014-11-05 07:02:40', 849405871, 624739301, 819504217) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:02:40', '2014-11-05 07:02:40', 624739301)  (5.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_groups ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_group --------------------------------------------------------------------- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:03:55', '2014-11-05 07:03:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:03:55', '2014-11-05 07:03:55', 849405871, 624739301, 819504217) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:03:55', '2014-11-05 07:03:55', 624739301)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 27ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:05:48', '2014-11-05 07:05:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:05:48', '2014-11-05 07:05:48', 849405871, 624739301, 819504217) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:05:48', '2014-11-05 07:05:48', 624739301)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 30ms (Views: 1.1ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 591498715) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:06:05', '2014-11-05 07:06:05', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:06:05', '2014-11-05 07:06:05', 849405871, 624739301, 819504217) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:06:05', '2014-11-05 07:06:05', 624739301)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 29ms (Views: 1.4ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:12', '2014-11-05 07:10:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:12', '2014-11-05 07:10:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:12', '2014-11-05 07:10:12', 98413728, 245026679, 784085492) Fixture Insert (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:12', '2014-11-05 07:10:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:10:12', '2014-11-05 07:10:12', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 35ms (Views: 1.3ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"group", "type_ids"=>["624739301", "245026679"]} Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_group_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:57', '2014-11-05 07:10:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:57', '2014-11-05 07:10:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:57', '2014-11-05 07:10:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:10:57', '2014-11-05 07:10:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:10:57', '2014-11-05 07:10:57', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 31ms (Views: 1.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:11:13', '2014-11-05 07:11:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:11:13', '2014-11-05 07:11:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:11:13', '2014-11-05 07:11:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:11:13', '2014-11-05 07:11:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:11:13', '2014-11-05 07:11:13', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 30ms (Views: 1.1ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fbe4cbe605fb42f5b41495bccf787641' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:11:13.340773"], ["extension", "txt"], ["name", "footest barish"], ["token", "fbe4cbe605fb42f5b41495bccf787641"], ["updated_at", "2014-11-05 07:11:13.340773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:11:13.352035"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:11:13.352035"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name ILIKE '%test%') [["movie_id", 624739301]] SQLite3::SQLException: near "ILIKE": syntax error: SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name ILIKE '%test%') Completed 500 Internal Server Error in 2ms  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 591498715) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:20', '2014-11-05 07:12:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:20', '2014-11-05 07:12:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:20', '2014-11-05 07:12:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:20', '2014-11-05 07:12:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:12:20', '2014-11-05 07:12:20', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 1.2ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cfb914f362db2405690d351c69fe744d' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:20.791293"], ["extension", "txt"], ["name", "footest barish"], ["token", "cfb914f362db2405690d351c69fe744d"], ["updated_at", "2014-11-05 07:12:20.791293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:20.801334"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:12:20.801334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:27', '2014-11-05 07:12:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:27', '2014-11-05 07:12:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:27', '2014-11-05 07:12:27', 98413728, 245026679, 784085492) Fixture Insert (0.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:27', '2014-11-05 07:12:27', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:12:27', '2014-11-05 07:12:27', 948421225)  (1.1ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 07:12:27.852469"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:12:27.867769"], ["name", "test"], ["updated_at", "2014-11-05 07:12:27.867769"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:12:27.876562"], ["name", "test"], ["updated_at", "2014-11-05 07:12:27.876562"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:27.878319"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:12:27.878319"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:27.879407"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 07:12:27.879407"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:12:27.898038"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (2.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:12:27.906664"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:27.927554"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:12:27.000000000 Z\n updated_at: 2014-11-05 07:12:27.906664000 Z\n"], ["run_at", "2014-11-05 07:12:37.911765"], ["updated_at", "2014-11-05 07:12:27.927554"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:12:27.934291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 07:12:27.937270"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:12:27.943097"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:12:27.947806"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:12:27.950019"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:27.953280"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:12:27.000000000 Z\n updated_at: 2014-11-05 07:12:27.950019000 Z\n"], ["run_at", "2014-11-05 07:12:37.950749"], ["updated_at", "2014-11-05 07:12:27.953280"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 1.3ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ae4adba79a4fedd7b38dd82ebe8fb245' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:27.988344"], ["extension", "txt"], ["name", "footest barish"], ["token", "ae4adba79a4fedd7b38dd82ebe8fb245"], ["updated_at", "2014-11-05 07:12:27.988344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:27.990845"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:12:27.990845"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:12:28.025996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:28.032510"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:12:28.032296"], ["updated_at", "2014-11-05 07:12:28.032510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.2ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 07:12:28.072343"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e234638053799fafbbc26a7853d7be36' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 07:12:28.086100"], ["extension", "png"], ["name", "Dummy"], ["token", "e234638053799fafbbc26a7853d7be36"], ["updated_at", "2014-11-05 07:12:28.086100"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.6ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:12:28.173454"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 07:12:28.184433"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:28.188891"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:12:28.188891"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:12:28.191347"], ["name", "test"], ["updated_at", "2014-11-05 07:12:28.191347"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::ResourcesControllerIndexTest: test_should_index_all_resources_for_groups --------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------- Fogged::ResourcesControllerIndexTest: test_should_index_resources_for_a_group -----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerIndexTest: test_should_index_resources_for_a_group_with_search_query_on_name -------------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourcesControllerIndexTest: test_should_index_resources_for_groups ----------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerIndexTest: test_should_index_resources_with_invalid_group_id ---------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerIndexTest: test_should_not_index_resources_as_anonymous ----------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bdb3e9d7aa4de94b43b19f34531f6d6f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:28.200199"], ["extension", "txt"], ["name", "Test"], ["token", "bdb3e9d7aa4de94b43b19f34531f6d6f"], ["updated_at", "2014-11-05 07:12:28.200199"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '234a8f3b1ea7072cf8c54ac901230751' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:28.203192"], ["extension", "txt"], ["name", "Test"], ["token", "234a8f3b1ea7072cf8c54ac901230751"], ["updated_at", "2014-11-05 07:12:28.203192"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c36f2d5695972e99e92b5af0086f8b98' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:28.207480"], ["extension", "txt"], ["name", "Test"], ["token", "c36f2d5695972e99e92b5af0086f8b98"], ["updated_at", "2014-11-05 07:12:28.207480"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f287b135b4ed7352740432dcec1cde97' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:28.209847"], ["extension", "txt"], ["name", "Test"], ["token", "f287b135b4ed7352740432dcec1cde97"], ["updated_at", "2014-11-05 07:12:28.209847"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'afe4bb024d285739a2a7796ab0227eea' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:28.213591"], ["extension", "txt"], ["name", "Test"], ["token", "afe4bb024d285739a2a7796ab0227eea"], ["updated_at", "2014-11-05 07:12:28.213591"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:12:28.220822"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:12:28.225122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:28.228209"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:12:28.228095"], ["updated_at", "2014-11-05 07:12:28.228209"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:41', '2014-11-05 07:12:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:41', '2014-11-05 07:12:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:41', '2014-11-05 07:12:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:12:41', '2014-11-05 07:12:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:12:41', '2014-11-05 07:12:41', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 28ms (Views: 1.3ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '37d01d2263afeb2a8e613bd3c1225b4b' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:12:41.373553"], ["extension", "txt"], ["name", "footest barish"], ["token", "37d01d2263afeb2a8e613bd3c1225b4b"], ["updated_at", "2014-11-05 07:12:41.373553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:12:41.383095"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:12:41.383095"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:02', '2014-11-05 07:13:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:02', '2014-11-05 07:13:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:02', '2014-11-05 07:13:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:02', '2014-11-05 07:13:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:13:02', '2014-11-05 07:13:02', 948421225)  (5.1ms) commit transaction  (7.8ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:13:02.508327"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.519157"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:13:02.519021"], ["updated_at", "2014-11-05 07:13:02.519157"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3f3c58488c565e2ed6a7c01e86e2185c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 07:13:02.533042"], ["extension", "png"], ["name", "Dummy"], ["token", "3f3c58488c565e2ed6a7c01e86e2185c"], ["updated_at", "2014-11-05 07:13:02.533042"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.8ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 07:13:02.575317"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:13:02.582171"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 07:13:02.593240"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.599824"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:13:02.599824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:13:02.602138"], ["name", "test"], ["updated_at", "2014-11-05 07:13:02.602138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:02.606122"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:13:02.609284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.614428"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:13:02.000000000 Z\n updated_at: 2014-11-05 07:13:02.609284000 Z\n"], ["run_at", "2014-11-05 07:13:12.611045"], ["updated_at", "2014-11-05 07:13:02.614428"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:02.618773"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 07:13:02.621735"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:02.625229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:02.628283"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:13:02.630385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.633669"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:13:02.000000000 Z\n updated_at: 2014-11-05 07:13:02.630385000 Z\n"], ["run_at", "2014-11-05 07:13:12.631149"], ["updated_at", "2014-11-05 07:13:02.633669"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 07:13:02.656082"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:13:02.660263"], ["name", "test"], ["updated_at", "2014-11-05 07:13:02.660263"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:13:02.664629"], ["name", "test"], ["updated_at", "2014-11-05 07:13:02.664629"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.665491"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:13:02.665491"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.666362"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 07:13:02.666362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 46ms (Views: 0.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a6e4e105e6a61aa5865a907e6951e416' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:02.745525"], ["extension", "txt"], ["name", "footest barish"], ["token", "a6e4e105e6a61aa5865a907e6951e416"], ["updated_at", "2014-11-05 07:13:02.745525"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.748472"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:13:02.748472"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f64c4d06b77c41db05d52dbee1a781de' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:02.770807"], ["extension", "txt"], ["name", "Test"], ["token", "f64c4d06b77c41db05d52dbee1a781de"], ["updated_at", "2014-11-05 07:13:02.770807"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3e942fd3350577cb99a9a0d35983ae8c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:02.775398"], ["extension", "txt"], ["name", "Test"], ["token", "3e942fd3350577cb99a9a0d35983ae8c"], ["updated_at", "2014-11-05 07:13:02.775398"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9d149c1a62a9114a40fa317ccc0433ff' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:02.781362"], ["extension", "txt"], ["name", "Test"], ["token", "9d149c1a62a9114a40fa317ccc0433ff"], ["updated_at", "2014-11-05 07:13:02.781362"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3e3323df10e7aab8ddf5377b080f3560' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:02.784111"], ["extension", "txt"], ["name", "Test"], ["token", "3e3323df10e7aab8ddf5377b080f3560"], ["updated_at", "2014-11-05 07:13:02.784111"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c580d69e7ec812d3856be46556651f0d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:02.787398"], ["extension", "txt"], ["name", "Test"], ["token", "c580d69e7ec812d3856be46556651f0d"], ["updated_at", "2014-11-05 07:13:02.787398"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:13:02.799327"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:13:02.805687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:02.809125"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:13:02.809029"], ["updated_at", "2014-11-05 07:13:02.809125"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:12', '2014-11-05 07:13:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:12', '2014-11-05 07:13:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:12', '2014-11-05 07:13:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:13:12', '2014-11-05 07:13:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:13:12', '2014-11-05 07:13:12', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 07:13:12.853054"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:12.866943"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:13:12.866943"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:13:12.869699"], ["name", "test"], ["updated_at", "2014-11-05 07:13:12.869699"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 19ms (Views: 1.1ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b8b6fbb6c5d920fb4a8098d72ded3834' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:12.929635"], ["extension", "txt"], ["name", "footest barish"], ["token", "b8b6fbb6c5d920fb4a8098d72ded3834"], ["updated_at", "2014-11-05 07:13:12.929635"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:12.935258"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:13:12.935258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ed1ab3e5c4a5c74e477563c330a51c35' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:12.958165"], ["extension", "txt"], ["name", "Test"], ["token", "ed1ab3e5c4a5c74e477563c330a51c35"], ["updated_at", "2014-11-05 07:13:12.958165"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'def9ab0bc101e87e635eeb874cb0db7f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:12.960808"], ["extension", "txt"], ["name", "Test"], ["token", "def9ab0bc101e87e635eeb874cb0db7f"], ["updated_at", "2014-11-05 07:13:12.960808"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3767f0de30183e1464e9f889b209592b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:12.964912"], ["extension", "txt"], ["name", "Test"], ["token", "3767f0de30183e1464e9f889b209592b"], ["updated_at", "2014-11-05 07:13:12.964912"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e371666dce78fd27cdd84e88f1dc3bd1' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:12.967617"], ["extension", "txt"], ["name", "Test"], ["token", "e371666dce78fd27cdd84e88f1dc3bd1"], ["updated_at", "2014-11-05 07:13:12.967617"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6538f8f7c4ff4e72803cc1ceb36cbd85' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:13:12.971278"], ["extension", "txt"], ["name", "Test"], ["token", "6538f8f7c4ff4e72803cc1ceb36cbd85"], ["updated_at", "2014-11-05 07:13:12.971278"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:13:12.979312"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:13:12.985124"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:12.994687"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:13:12.994547"], ["updated_at", "2014-11-05 07:13:12.994687"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 07:13:13.019361"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:13:13.023350"], ["name", "test"], ["updated_at", "2014-11-05 07:13:13.023350"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:13:13.027824"], ["name", "test"], ["updated_at", "2014-11-05 07:13:13.027824"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:13.028733"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:13:13.028733"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:13.029524"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 07:13:13.029524"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 07:13:13.037519"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a547c7a5f39a0276294da9cc88ee4e28' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 07:13:13.079371"], ["extension", "png"], ["name", "Dummy"], ["token", "a547c7a5f39a0276294da9cc88ee4e28"], ["updated_at", "2014-11-05 07:13:13.079371"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:13:13.106893"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:13.109808"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:13:13.109732"], ["updated_at", "2014-11-05 07:13:13.109808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:13:13.117927"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (3.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:13.128786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:13:13.131310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:13.135031"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:13:12.000000000 Z\n updated_at: 2014-11-05 07:13:13.131310000 Z\n"], ["run_at", "2014-11-05 07:13:23.132121"], ["updated_at", "2014-11-05 07:13:13.135031"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:13.139039"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 07:13:13.141654"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (4.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:13.150126"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:13:13.153875"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:13:13.155944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:13:13.158935"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:13:12.000000000 Z\n updated_at: 2014-11-05 07:13:13.155944000 Z\n"], ["run_at", "2014-11-05 07:13:23.156583"], ["updated_at", "2014-11-05 07:13:13.158935"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateDelayedJobs (20141105073909)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "delayed_jobs"  (0.1ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.0ms) select sqlite_version(*)  (0.1ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141105073909"]]  (5.3ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:40:35', '2014-11-05 07:40:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:40:35', '2014-11-05 07:40:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:40:35', '2014-11-05 07:40:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:40:35', '2014-11-05 07:40:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:40:35', '2014-11-05 07:40:35', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 07:40:35.708093"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:40:35.721275"], ["name", "test"], ["updated_at", "2014-11-05 07:40:35.721275"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:40:35.726287"], ["name", "test"], ["updated_at", "2014-11-05 07:40:35.726287"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:40:35.727206"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:40:35.727206"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:40:35.728076"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 07:40:35.728076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 10ms (Views: 0.7ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f2e24bb5075d815b45d95d25824ffc01' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:40:35.773464"], ["extension", "txt"], ["name", "footest barish"], ["token", "f2e24bb5075d815b45d95d25824ffc01"], ["updated_at", "2014-11-05 07:40:35.773464"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:40:35.775794"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:40:35.775794"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 07:40:35.800968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 07:40:35.808209"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:40:35.812191"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:40:35.812191"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:40:35.814341"], ["name", "test"], ["updated_at", "2014-11-05 07:40:35.814341"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:40:35.817210"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:40:35.821448"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:40:35.824593"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:40:35.827403"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '49dcfaff01b747c75eecb66c9cf7eb4e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 07:40:35.833270"], ["extension", "png"], ["name", "Dummy"], ["token", "49dcfaff01b747c75eecb66c9cf7eb4e"], ["updated_at", "2014-11-05 07:40:35.833270"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f9fde75542e2feb12caba050d46f3dce' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:40:35.863566"], ["extension", "txt"], ["name", "Test"], ["token", "f9fde75542e2feb12caba050d46f3dce"], ["updated_at", "2014-11-05 07:40:35.863566"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'daee39e182559ab016301823c7555ca1' LIMIT 1 SQL (33.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:40:35.866162"], ["extension", "txt"], ["name", "Test"], ["token", "daee39e182559ab016301823c7555ca1"], ["updated_at", "2014-11-05 07:40:35.866162"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c7e3518c6b3cfc2b56954879e97a8b1a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:40:35.904552"], ["extension", "txt"], ["name", "Test"], ["token", "c7e3518c6b3cfc2b56954879e97a8b1a"], ["updated_at", "2014-11-05 07:40:35.904552"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'db4a83ec74cf22e6b1146c1450cccdae' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:40:35.908021"], ["extension", "txt"], ["name", "Test"], ["token", "db4a83ec74cf22e6b1146c1450cccdae"], ["updated_at", "2014-11-05 07:40:35.908021"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ec472e41d587da1b6a7137bcf3c353d3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:40:35.911841"], ["extension", "txt"], ["name", "Test"], ["token", "ec472e41d587da1b6a7137bcf3c353d3"], ["updated_at", "2014-11-05 07:40:35.911841"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:50', '2014-11-05 07:41:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:50', '2014-11-05 07:41:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:50', '2014-11-05 07:41:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:50', '2014-11-05 07:41:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:41:50', '2014-11-05 07:41:50', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:41:50.463166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:50.474104"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:41:50.473970"], ["updated_at", "2014-11-05 07:41:50.474104"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:56', '2014-11-05 07:41:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:56', '2014-11-05 07:41:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:56', '2014-11-05 07:41:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:41:56', '2014-11-05 07:41:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:41:56', '2014-11-05 07:41:56', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fef92cc72aa18944d4072c7522594430' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 07:41:56.369825"], ["extension", "png"], ["name", "Dummy"], ["token", "fef92cc72aa18944d4072c7522594430"], ["updated_at", "2014-11-05 07:41:56.369825"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 21ms (Views: 1.5ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 7ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:41:56.407619"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.419192"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:41:56.419064"], ["updated_at", "2014-11-05 07:41:56.419192"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 07:41:56.427268"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.435885"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:41:56.435885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:41:56.438442"], ["name", "test"], ["updated_at", "2014-11-05 07:41:56.438442"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:41:56.442821"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:41:56.445351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.450454"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:41:56.000000000 Z\n updated_at: 2014-11-05 07:41:56.445351000 Z\n"], ["run_at", "2014-11-05 07:42:06.446778"], ["updated_at", "2014-11-05 07:41:56.450454"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:41:56.454449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 68463692 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 07:41:56.457515"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:41:56.461148"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 07:41:56.464685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_progress", 55], ["updated_at", "2014-11-05 07:41:56.466924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.470640"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 68463692\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 07:41:56.000000000 Z\n updated_at: 2014-11-05 07:41:56.466924000 Z\n"], ["run_at", "2014-11-05 07:42:06.467596"], ["updated_at", "2014-11-05 07:41:56.470640"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1dd6d2c4bb8dc5fca51f009c7392e1d2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:41:56.475768"], ["extension", "txt"], ["name", "Test"], ["token", "1dd6d2c4bb8dc5fca51f009c7392e1d2"], ["updated_at", "2014-11-05 07:41:56.475768"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd5eae649c74b9c796bb3f88265abd0a1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:41:56.478233"], ["extension", "txt"], ["name", "Test"], ["token", "d5eae649c74b9c796bb3f88265abd0a1"], ["updated_at", "2014-11-05 07:41:56.478233"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '14259fe6891283a2e4ba26c7dd0c7b16' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:41:56.482491"], ["extension", "txt"], ["name", "Test"], ["token", "14259fe6891283a2e4ba26c7dd0c7b16"], ["updated_at", "2014-11-05 07:41:56.482491"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ae376b5984d9234ae46eec1897356163' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:41:56.485384"], ["extension", "txt"], ["name", "Test"], ["token", "ae376b5984d9234ae46eec1897356163"], ["updated_at", "2014-11-05 07:41:56.485384"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '88e245b8b8cf629a3901e8461f4ed822' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:41:56.488454"], ["extension", "txt"], ["name", "Test"], ["token", "88e245b8b8cf629a3901e8461f4ed822"], ["updated_at", "2014-11-05 07:41:56.488454"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:41:56.494502"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:41:56.499835"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.502449"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:41:56.502385"], ["updated_at", "2014-11-05 07:41:56.502449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 07:41:56.582410"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:41:56.587229"], ["name", "test"], ["updated_at", "2014-11-05 07:41:56.587229"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 07:41:56.592243"], ["name", "test"], ["updated_at", "2014-11-05 07:41:56.592243"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.593076"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 07:41:56.593076"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.593920"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 07:41:56.593920"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2d4d0e1b66d82f11082987c7f01650d2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 07:41:56.618602"], ["extension", "txt"], ["name", "footest barish"], ["token", "2d4d0e1b66d82f11082987c7f01650d2"], ["updated_at", "2014-11-05 07:41:56.618602"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:41:56.620832"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 07:41:56.620832"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 07:41:56.641584"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 07:41:56.655584"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:47:23', '2014-11-05 07:47:23', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:47:24', '2014-11-05 07:47:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:47:24', '2014-11-05 07:47:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:47:24', '2014-11-05 07:47:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:47:24', '2014-11-05 07:47:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:47:24', '2014-11-05 07:47:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:47:24', '2014-11-05 07:47:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:47:24', '2014-11-05 07:47:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:47:24', '2014-11-05 07:47:24', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:47:24', '2014-11-05 07:47:24', 948421225)  (4.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:47:24.127037"]]  (4929.9ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.4ms) rollback transaction  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:51:45', '2014-11-05 07:51:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:51:45', '2014-11-05 07:51:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:51:45', '2014-11-05 07:51:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:51:45', '2014-11-05 07:51:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:51:45', '2014-11-05 07:51:45', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:51:45.958293"]]  (4933.3ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.7ms) rollback transaction  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:52:16', '2014-11-05 07:52:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:52:16', '2014-11-05 07:52:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:52:16', '2014-11-05 07:52:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:52:16', '2014-11-05 07:52:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:52:16', '2014-11-05 07:52:16', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:52:16.608152"]]  (4929.0ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (5.0ms) rollback transaction  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:55:47', '2014-11-05 07:55:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:55:47', '2014-11-05 07:55:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:55:47', '2014-11-05 07:55:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:55:47', '2014-11-05 07:55:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:55:47', '2014-11-05 07:55:47', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:55:48.117158"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:55:48.142545"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:55:48.142115"], ["updated_at", "2014-11-05 07:55:48.142545"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction ArgumentError: prepare called on a closed database: begin transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:05', '2014-11-05 07:56:05', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:05', '2014-11-05 07:56:05', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:05', '2014-11-05 07:56:05', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:05', '2014-11-05 07:56:05', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:56:05', '2014-11-05 07:56:05', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:56:05.934353"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:56:05.951378"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:56:05.951106"], ["updated_at", "2014-11-05 07:56:05.951378"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction ArgumentError: prepare called on a closed database: begin transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:40', '2014-11-05 07:56:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:40', '2014-11-05 07:56:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:40', '2014-11-05 07:56:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:56:40', '2014-11-05 07:56:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:56:40', '2014-11-05 07:56:40', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ArgumentError: prepare called on a closed database: begin transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:56:40.168826"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:56:40.192157"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:56:40.191873"], ["updated_at", "2014-11-05 07:56:40.192157"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:20', '2014-11-05 07:57:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:20', '2014-11-05 07:57:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:20', '2014-11-05 07:57:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:20', '2014-11-05 07:57:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:57:20', '2014-11-05 07:57:20', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:57:20.444585"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:57:20.463571"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:57:20.463293"], ["updated_at", "2014-11-05 07:57:20.463571"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction ArgumentError: prepare called on a closed database: begin transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:52', '2014-11-05 07:57:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:52', '2014-11-05 07:57:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:52', '2014-11-05 07:57:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:57:52', '2014-11-05 07:57:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:57:52', '2014-11-05 07:57:52', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:57:52.207677"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:57:52.226870"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:57:52.226464"], ["updated_at", "2014-11-05 07:57:52.226870"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (11.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:58:00', '2014-11-05 07:58:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:58:00', '2014-11-05 07:58:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:58:00', '2014-11-05 07:58:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 07:58:00', '2014-11-05 07:58:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 07:58:00', '2014-11-05 07:58:00', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 07:58:00.985027"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 07:58:01.003511"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 07:58:01.003240"], ["updated_at", "2014-11-05 07:58:01.003511"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:16', '2014-11-05 08:11:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:16', '2014-11-05 08:11:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:16', '2014-11-05 08:11:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:16', '2014-11-05 08:11:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:11:16', '2014-11-05 08:11:16', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:32', '2014-11-05 08:11:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:32', '2014-11-05 08:11:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:32', '2014-11-05 08:11:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:11:32', '2014-11-05 08:11:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:11:32', '2014-11-05 08:11:32', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:12:26', '2014-11-05 08:12:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:12:26', '2014-11-05 08:12:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:12:26', '2014-11-05 08:12:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:12:26', '2014-11-05 08:12:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:12:26', '2014-11-05 08:12:26', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:17:56', '2014-11-05 08:17:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:17:56', '2014-11-05 08:17:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:17:56', '2014-11-05 08:17:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:17:56', '2014-11-05 08:17:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:17:56', '2014-11-05 08:17:56', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:25', '2014-11-05 08:26:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:25', '2014-11-05 08:26:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:25', '2014-11-05 08:26:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:25', '2014-11-05 08:26:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:26:25', '2014-11-05 08:26:25', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:41', '2014-11-05 08:26:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:41', '2014-11-05 08:26:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:41', '2014-11-05 08:26:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:26:41', '2014-11-05 08:26:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:26:41', '2014-11-05 08:26:41', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:26:41.600415"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:26:41.622429"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:26:41.622119"], ["updated_at", "2014-11-05 08:26:41.622429"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:26', '2014-11-05 08:27:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:26', '2014-11-05 08:27:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:26', '2014-11-05 08:27:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:26', '2014-11-05 08:27:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:27:26', '2014-11-05 08:27:26', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:27:26.464570"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:27:26.488450"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:27:26.487995"], ["updated_at", "2014-11-05 08:27:26.488450"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:55', '2014-11-05 08:27:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:55', '2014-11-05 08:27:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:55', '2014-11-05 08:27:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:27:55', '2014-11-05 08:27:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:27:55', '2014-11-05 08:27:55', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:27:55.342114"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:27:55.360350"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:27:55.360053"], ["updated_at", "2014-11-05 08:27:55.360350"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:11', '2014-11-05 08:32:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:11', '2014-11-05 08:32:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:11', '2014-11-05 08:32:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:11', '2014-11-05 08:32:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:32:11', '2014-11-05 08:32:11', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:32:11.914160"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:32:11.934681"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:32:11.934413"], ["updated_at", "2014-11-05 08:32:11.934681"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:41', '2014-11-05 08:32:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:41', '2014-11-05 08:32:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:41', '2014-11-05 08:32:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:32:41', '2014-11-05 08:32:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:32:41', '2014-11-05 08:32:41', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:32:41.626385"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:32:41.649642"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:32:41.649263"], ["updated_at", "2014-11-05 08:32:41.649642"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:03', '2014-11-05 08:33:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:03', '2014-11-05 08:33:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:03', '2014-11-05 08:33:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:03', '2014-11-05 08:33:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:33:03', '2014-11-05 08:33:03', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:33:03.178541"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:33:03.200752"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:33:03.200404"], ["updated_at", "2014-11-05 08:33:03.200752"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:40', '2014-11-05 08:33:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:40', '2014-11-05 08:33:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:40', '2014-11-05 08:33:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:33:40', '2014-11-05 08:33:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:33:40', '2014-11-05 08:33:40', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:33:41.108383"]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:33:41.128050"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:33:41.127754"], ["updated_at", "2014-11-05 08:33:41.128050"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:34:27', '2014-11-05 08:34:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:34:27', '2014-11-05 08:34:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:34:27', '2014-11-05 08:34:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:34:27', '2014-11-05 08:34:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:34:27', '2014-11-05 08:34:27', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:34:27.166104"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:34:27.184684"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:34:27.184417"], ["updated_at", "2014-11-05 08:34:27.184684"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:17', '2014-11-05 08:35:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:17', '2014-11-05 08:35:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:17', '2014-11-05 08:35:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:17', '2014-11-05 08:35:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:35:17', '2014-11-05 08:35:17', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:35:17.136043"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:35:17.159202"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:35:17.158849"], ["updated_at", "2014-11-05 08:35:17.159202"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:51', '2014-11-05 08:35:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:51', '2014-11-05 08:35:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:51', '2014-11-05 08:35:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:35:51', '2014-11-05 08:35:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:35:51', '2014-11-05 08:35:51', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:35:51.437547"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:35:51.459095"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:35:51.458813"], ["updated_at", "2014-11-05 08:35:51.459095"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:03', '2014-11-05 08:36:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:03', '2014-11-05 08:36:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:03', '2014-11-05 08:36:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:03', '2014-11-05 08:36:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:36:03', '2014-11-05 08:36:03', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:36:03.366045"]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:36:03.390784"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:36:03.390434"], ["updated_at", "2014-11-05 08:36:03.390784"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:33', '2014-11-05 08:36:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:33', '2014-11-05 08:36:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:33', '2014-11-05 08:36:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:36:33', '2014-11-05 08:36:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:36:33', '2014-11-05 08:36:33', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:36:33.465094"]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:36:33.489069"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:36:33.488710"], ["updated_at", "2014-11-05 08:36:33.489069"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:38:41', '2014-11-05 08:38:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:38:41', '2014-11-05 08:38:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:38:41', '2014-11-05 08:38:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:38:41', '2014-11-05 08:38:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:38:41', '2014-11-05 08:38:41', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:38:41.314541"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:38:41.338491"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:38:41.337970"], ["updated_at", "2014-11-05 08:38:41.338491"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:39:32', '2014-11-05 08:39:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:39:32', '2014-11-05 08:39:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:39:32', '2014-11-05 08:39:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:39:32', '2014-11-05 08:39:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:39:32', '2014-11-05 08:39:32', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:39:32.795660"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:39:32.818009"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:39:32.817728"], ["updated_at", "2014-11-05 08:39:32.818009"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:40:53', '2014-11-05 08:40:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:40:53', '2014-11-05 08:40:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:40:53', '2014-11-05 08:40:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:40:53', '2014-11-05 08:40:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:40:53', '2014-11-05 08:40:53', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:40:53.523984"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:40:53.545532"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:40:53.545223"], ["updated_at", "2014-11-05 08:40:53.545532"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:43:19', '2014-11-05 08:43:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:43:19', '2014-11-05 08:43:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:43:19', '2014-11-05 08:43:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:43:19', '2014-11-05 08:43:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:43:19', '2014-11-05 08:43:19', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:43:19.885718"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:43:19.908767"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:43:19.908491"], ["updated_at", "2014-11-05 08:43:19.908767"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:06', '2014-11-05 08:44:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:06', '2014-11-05 08:44:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:06', '2014-11-05 08:44:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:06', '2014-11-05 08:44:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:44:06', '2014-11-05 08:44:06', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:44:06.305022"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:44:06.325704"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:44:06.325422"], ["updated_at", "2014-11-05 08:44:06.325704"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:12', '2014-11-05 08:44:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:12', '2014-11-05 08:44:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:12', '2014-11-05 08:44:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:12', '2014-11-05 08:44:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:44:12', '2014-11-05 08:44:12', 948421225)  (1.6ms) commit transaction  (0.3ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 08:44:12.686161"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 08:44:12.698867"], ["name", "test"], ["updated_at", "2014-11-05 08:44:12.698867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 08:44:12.704059"], ["name", "test"], ["updated_at", "2014-11-05 08:44:12.704059"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:44:12.705104"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 08:44:12.705104"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:44:12.706016"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 08:44:12.706016"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3b56093ac495f8493e664ab07b8ce6fc' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 08:44:12.728825"], ["extension", "png"], ["name", "Dummy"], ["token", "3b56093ac495f8493e664ab07b8ce6fc"], ["updated_at", "2014-11-05 08:44:12.728825"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.1ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 1.4ms | ActiveRecord: 0.8ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4762c33ef38f5834803881162368f428' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:44:12.783618"], ["extension", "txt"], ["name", "footest barish"], ["token", "4762c33ef38f5834803881162368f428"], ["updated_at", "2014-11-05 08:44:12.783618"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:44:12.785732"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 08:44:12.785732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 08:44:12.831313"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:44:12.835310"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 08:44:12.835310"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 08:44:12.837421"], ["name", "test"], ["updated_at", "2014-11-05 08:44:12.837421"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:44:13.001728"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:44:13.019571"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:44:13.019282"], ["updated_at", "2014-11-05 08:44:13.019571"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:13', '2014-11-05 08:44:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:13', '2014-11-05 08:44:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:13', '2014-11-05 08:44:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:44:13', '2014-11-05 08:44:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:44:13', '2014-11-05 08:44:13', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:44:13.462232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:44:13.469913"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:44:13.474958"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:44:13.522224"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 08:44:13.537810"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5b3d34a830b8519e6e0f5a1fa79e187d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:44:13.543657"], ["extension", "txt"], ["name", "Test"], ["token", "5b3d34a830b8519e6e0f5a1fa79e187d"], ["updated_at", "2014-11-05 08:44:13.543657"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a7a036287122aec71e33fd2100bbf881' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:44:13.546973"], ["extension", "txt"], ["name", "Test"], ["token", "a7a036287122aec71e33fd2100bbf881"], ["updated_at", "2014-11-05 08:44:13.546973"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '18bc02235315d7beb293aa147dcb0f65' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:44:13.552294"], ["extension", "txt"], ["name", "Test"], ["token", "18bc02235315d7beb293aa147dcb0f65"], ["updated_at", "2014-11-05 08:44:13.552294"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ffcee8a6b902e59ec2eac7164383c745' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:44:13.555472"], ["extension", "txt"], ["name", "Test"], ["token", "ffcee8a6b902e59ec2eac7164383c745"], ["updated_at", "2014-11-05 08:44:13.555472"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '483a970c9cccaffc356e0d375f69311c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:44:13.559706"], ["extension", "txt"], ["name", "Test"], ["token", "483a970c9cccaffc356e0d375f69311c"], ["updated_at", "2014-11-05 08:44:13.559706"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:46:20', '2014-11-05 08:46:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:46:20', '2014-11-05 08:46:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:46:20', '2014-11-05 08:46:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:46:20', '2014-11-05 08:46:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:46:20', '2014-11-05 08:46:20', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd3660120208c591f1140084fb5675996' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:46:20.619193"], ["extension", "txt"], ["name", "Test"], ["token", "d3660120208c591f1140084fb5675996"], ["updated_at", "2014-11-05 08:46:20.619193"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'beacf1e21532b29fd031f8a159cd692e' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:46:20.623621"], ["extension", "txt"], ["name", "Test"], ["token", "beacf1e21532b29fd031f8a159cd692e"], ["updated_at", "2014-11-05 08:46:20.623621"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6aa2b7667f7629def43960b9bacd51e1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:46:20.630921"], ["extension", "txt"], ["name", "Test"], ["token", "6aa2b7667f7629def43960b9bacd51e1"], ["updated_at", "2014-11-05 08:46:20.630921"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a2658da82f9e799a0dc2d4157134db1e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:46:20.633786"], ["extension", "txt"], ["name", "Test"], ["token", "a2658da82f9e799a0dc2d4157134db1e"], ["updated_at", "2014-11-05 08:46:20.633786"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b5b3ee3738ab95c76b109f8a5e49f975' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:46:20.637225"], ["extension", "txt"], ["name", "Test"], ["token", "b5b3ee3738ab95c76b109f8a5e49f975"], ["updated_at", "2014-11-05 08:46:20.637225"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:51:43', '2014-11-05 08:51:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:51:43', '2014-11-05 08:51:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:51:43', '2014-11-05 08:51:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:51:43', '2014-11-05 08:51:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:51:43', '2014-11-05 08:51:43', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aedb540d6477a31df258b7f43fed2ffe' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:51:43.939651"], ["extension", "txt"], ["name", "Test"], ["token", "aedb540d6477a31df258b7f43fed2ffe"], ["updated_at", "2014-11-05 08:51:43.939651"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd15dcec37f1b8434b7e2a76ec316e1a9' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:51:43.945025"], ["extension", "txt"], ["name", "Test"], ["token", "d15dcec37f1b8434b7e2a76ec316e1a9"], ["updated_at", "2014-11-05 08:51:43.945025"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'eb29390cd81135150c59ea69366b0aed' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:51:43.950844"], ["extension", "txt"], ["name", "Test"], ["token", "eb29390cd81135150c59ea69366b0aed"], ["updated_at", "2014-11-05 08:51:43.950844"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd3e04d853f0f96026ae8fc2a424956c4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:51:43.953491"], ["extension", "txt"], ["name", "Test"], ["token", "d3e04d853f0f96026ae8fc2a424956c4"], ["updated_at", "2014-11-05 08:51:43.953491"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '988f6a7d266b875c939b77b964b8b5d3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:51:43.957635"], ["extension", "txt"], ["name", "Test"], ["token", "988f6a7d266b875c939b77b964b8b5d3"], ["updated_at", "2014-11-05 08:51:43.957635"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 08:51:43.974645"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:04', '2014-11-05 08:59:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:04', '2014-11-05 08:59:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:04', '2014-11-05 08:59:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:04', '2014-11-05 08:59:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:59:04', '2014-11-05 08:59:04', 948421225)  (7.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7999bd363ec78832a9acbf5e7ad9c8e3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:04.429763"], ["extension", "txt"], ["name", "Test"], ["token", "7999bd363ec78832a9acbf5e7ad9c8e3"], ["updated_at", "2014-11-05 08:59:04.429763"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '61c1ddcb9e0cbe43eab7a1034e68434e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:04.433241"], ["extension", "txt"], ["name", "Test"], ["token", "61c1ddcb9e0cbe43eab7a1034e68434e"], ["updated_at", "2014-11-05 08:59:04.433241"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c3fc3d60abaeb98cef09dc8848739c37' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:04.438599"], ["extension", "txt"], ["name", "Test"], ["token", "c3fc3d60abaeb98cef09dc8848739c37"], ["updated_at", "2014-11-05 08:59:04.438599"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7d03bfb9d791d5b1f3b5f1f6bf2bd1fd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:04.441676"], ["extension", "txt"], ["name", "Test"], ["token", "7d03bfb9d791d5b1f3b5f1f6bf2bd1fd"], ["updated_at", "2014-11-05 08:59:04.441676"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1e904e7f8261cf82ab088447137f8ab3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:04.445500"], ["extension", "txt"], ["name", "Test"], ["token", "1e904e7f8261cf82ab088447137f8ab3"], ["updated_at", "2014-11-05 08:59:04.445500"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 08:59:04.458936"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:59:04.560258"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:04.582222"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:59:04.581894"], ["updated_at", "2014-11-05 08:59:04.582222"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:13', '2014-11-05 08:59:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:13', '2014-11-05 08:59:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:13', '2014-11-05 08:59:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:13', '2014-11-05 08:59:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:59:13', '2014-11-05 08:59:13', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 08:59:13.627376"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 08:59:13.638135"], ["name", "test"], ["updated_at", "2014-11-05 08:59:13.638135"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 08:59:13.644661"], ["name", "test"], ["updated_at", "2014-11-05 08:59:13.644661"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:13.646054"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 08:59:13.646054"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:13.647306"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 08:59:13.647306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:59:13.671388"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:59:13.675299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:59:13.678457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 08:59:13.681804"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '801f3943551a5c21e7d79ba714f23aac' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 08:59:13.708687"], ["extension", "png"], ["name", "Dummy"], ["token", "801f3943551a5c21e7d79ba714f23aac"], ["updated_at", "2014-11-05 08:59:13.708687"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 9ms (Views: 0.7ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f673ef6a2dc8713b26a47a3e06448855' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:13.754260"], ["extension", "txt"], ["name", "footest barish"], ["token", "f673ef6a2dc8713b26a47a3e06448855"], ["updated_at", "2014-11-05 08:59:13.754260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:13.756320"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 08:59:13.756320"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 08:59:13.780053"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 08:59:13.821445"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:13.825332"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 08:59:13.825332"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 08:59:13.827400"], ["name", "test"], ["updated_at", "2014-11-05 08:59:13.827400"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9c502210185371d3a28329cb0d3b7a39' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:13.830473"], ["extension", "txt"], ["name", "Test"], ["token", "9c502210185371d3a28329cb0d3b7a39"], ["updated_at", "2014-11-05 08:59:13.830473"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '06583a8fbb303c8f65204a50fc0ade6b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:13.833344"], ["extension", "txt"], ["name", "Test"], ["token", "06583a8fbb303c8f65204a50fc0ade6b"], ["updated_at", "2014-11-05 08:59:13.833344"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a99fc8ce4f1457351203a4ac49c0a2a2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:13.837884"], ["extension", "txt"], ["name", "Test"], ["token", "a99fc8ce4f1457351203a4ac49c0a2a2"], ["updated_at", "2014-11-05 08:59:13.837884"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9eafc2ee3bd83b513fe744a58fcd6f0c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:13.840715"], ["extension", "txt"], ["name", "Test"], ["token", "9eafc2ee3bd83b513fe744a58fcd6f0c"], ["updated_at", "2014-11-05 08:59:13.840715"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e3a17dcb16dd9f7036beec1f7b5ba128' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 08:59:13.844039"], ["extension", "txt"], ["name", "Test"], ["token", "e3a17dcb16dd9f7036beec1f7b5ba128"], ["updated_at", "2014-11-05 08:59:13.844039"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 08:59:13.850364"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:59:13.945102"]]  (0.8ms) commit transaction  (0.4ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:13.966861"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:59:13.966430"], ["updated_at", "2014-11-05 08:59:13.966861"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:14', '2014-11-05 08:59:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:14', '2014-11-05 08:59:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:14', '2014-11-05 08:59:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 08:59:14', '2014-11-05 08:59:14', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 08:59:14', '2014-11-05 08:59:14', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 08:59:14.213339"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 08:59:14.233833"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 08:59:14.233354"], ["updated_at", "2014-11-05 08:59:14.233833"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 09:01:48.299198"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '300b1c42b77750bc14687746d955dfc6' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 09:01:48.313844"], ["extension", "png"], ["name", "Dummy"], ["token", "300b1c42b77750bc14687746d955dfc6"], ["updated_at", "2014-11-05 09:01:48.313844"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.5ms | ActiveRecord: 0.8ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 20ms (Views: 0.7ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3d3aeec2391b2e1fd2f219b6c62dc7c5' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:01:48.378472"], ["extension", "txt"], ["name", "footest barish"], ["token", "3d3aeec2391b2e1fd2f219b6c62dc7c5"], ["updated_at", "2014-11-05 09:01:48.378472"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:01:48.385894"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 09:01:48.385894"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:01:48.408964"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5351f664587bd6399db4611b90d6d86b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:01:48.417892"], ["extension", "txt"], ["name", "Test"], ["token", "5351f664587bd6399db4611b90d6d86b"], ["updated_at", "2014-11-05 09:01:48.417892"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6f56bc23e1e5e747073c6a783873d81f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:01:48.420532"], ["extension", "txt"], ["name", "Test"], ["token", "6f56bc23e1e5e747073c6a783873d81f"], ["updated_at", "2014-11-05 09:01:48.420532"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5050f18f610f634ea16256f8549c85d8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:01:48.424934"], ["extension", "txt"], ["name", "Test"], ["token", "5050f18f610f634ea16256f8549c85d8"], ["updated_at", "2014-11-05 09:01:48.424934"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '201f8545e994fb8faa7519642523933a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:01:48.427354"], ["extension", "txt"], ["name", "Test"], ["token", "201f8545e994fb8faa7519642523933a"], ["updated_at", "2014-11-05 09:01:48.427354"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3966a61d39f9fb6f41401471afba77e0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:01:48.430287"], ["extension", "txt"], ["name", "Test"], ["token", "3966a61d39f9fb6f41401471afba77e0"], ["updated_at", "2014-11-05 09:01:48.430287"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:01:48.436228"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 09:01:48.547360"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:01:48.638616"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 09:01:48.638351"], ["updated_at", "2014-11-05 09:01:48.638616"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:48', '2014-11-05 09:01:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:01:48', '2014-11-05 09:01:48', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 09:01:48.948788"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:01:48.967696"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 09:01:48.967348"], ["updated_at", "2014-11-05 09:01:48.967696"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:49', '2014-11-05 09:01:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:49', '2014-11-05 09:01:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:49', '2014-11-05 09:01:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:01:49', '2014-11-05 09:01:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:01:49', '2014-11-05 09:01:49', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 09:01:49.345312"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:01:49.350478"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 09:01:49.350478"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 09:01:49.353032"], ["name", "test"], ["updated_at", "2014-11-05 09:01:49.353032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 09:01:49.414925"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 09:01:49.419597"], ["name", "test"], ["updated_at", "2014-11-05 09:01:49.419597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 09:01:49.424954"], ["name", "test"], ["updated_at", "2014-11-05 09:01:49.424954"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:01:49.425962"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 09:01:49.425962"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:01:49.427363"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 09:01:49.427363"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:01:49.431601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:01:49.436470"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:01:49.440146"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:01:49.443935"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:02:04', '2014-11-05 09:02:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:02:04', '2014-11-05 09:02:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:02:04', '2014-11-05 09:02:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:02:04', '2014-11-05 09:02:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:02:04', '2014-11-05 09:02:04', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:02:04.198795"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 591498715) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:22', '2014-11-05 09:08:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:22', '2014-11-05 09:08:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:22', '2014-11-05 09:08:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:22', '2014-11-05 09:08:22', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:08:22', '2014-11-05 09:08:22', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:08:22.675212"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.7ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ ArgumentError: prepare called on a closed database: SELECT name FROM sqlite_master WHERE type = 'table' AND NOT name = 'sqlite_sequence' AND name = "fogged_resources"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:35', '2014-11-05 09:08:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:35', '2014-11-05 09:08:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:35', '2014-11-05 09:08:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:08:35', '2014-11-05 09:08:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:08:35', '2014-11-05 09:08:35', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:08:35.853434"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:09:04', '2014-11-05 09:09:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:09:04', '2014-11-05 09:09:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:09:04', '2014-11-05 09:09:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:09:04', '2014-11-05 09:09:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:09:04', '2014-11-05 09:09:04', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:09:04.681834"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.8ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 09:09:04.783798"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:09:04.802620"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 09:09:04.802272"], ["updated_at", "2014-11-05 09:09:04.802620"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 32ms (Views: 1.8ms | ActiveRecord: 3.2ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:10:26', '2014-11-05 09:10:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:10:26', '2014-11-05 09:10:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:10:26', '2014-11-05 09:10:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:10:26', '2014-11-05 09:10:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:10:26', '2014-11-05 09:10:26', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:10:26.321209"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:10:26.764444"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:10:27.196736"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:10:27.629967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:03', '2014-11-05 09:11:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:03', '2014-11-05 09:11:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:03', '2014-11-05 09:11:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:03', '2014-11-05 09:11:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:11:03', '2014-11-05 09:11:03', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:11:03.461232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:11:03.933716"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:11:04.396077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:11:04.845380"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:34', '2014-11-05 09:11:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:34', '2014-11-05 09:11:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:34', '2014-11-05 09:11:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:34', '2014-11-05 09:11:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:11:34', '2014-11-05 09:11:34', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:11:34.083377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:58', '2014-11-05 09:11:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:58', '2014-11-05 09:11:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:58', '2014-11-05 09:11:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:11:58', '2014-11-05 09:11:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:11:58', '2014-11-05 09:11:58', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:11:58.136890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:12:47', '2014-11-05 09:12:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:12:47', '2014-11-05 09:12:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:12:47', '2014-11-05 09:12:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:12:47', '2014-11-05 09:12:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:12:47', '2014-11-05 09:12:47', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:12:47.923198"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 591498715) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:14:06', '2014-11-05 09:14:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:14:06', '2014-11-05 09:14:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:14:06', '2014-11-05 09:14:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:14:06', '2014-11-05 09:14:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:14:06', '2014-11-05 09:14:06', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", 1234567890], ["encoding_progress", 10], ["updated_at", "2014-11-05 09:14:06.958234"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:27:43', '2014-11-05 09:27:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:27:43', '2014-11-05 09:27:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:27:43', '2014-11-05 09:27:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:27:43', '2014-11-05 09:27:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:27:43', '2014-11-05 09:27:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:27:43', '2014-11-05 09:27:43', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:28:11', '2014-11-05 09:28:11', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:11', '2014-11-05 09:28:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:11', '2014-11-05 09:28:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:11', '2014-11-05 09:28:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:11', '2014-11-05 09:28:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:28:11', '2014-11-05 09:28:11', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 09:28:11.482401"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:11.508176"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 09:28:11.000000000 Z\n updated_at: 2014-11-05 09:28:11.482401000 Z\n"], ["run_at", "2014-11-05 09:28:21.490085"], ["updated_at", "2014-11-05 09:28:11.508176"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 09:28:11.736846"], ["width", 800]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 09:28:12.196513"]]  (5.2ms) commit transaction  (0.3ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:12.228897"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-05 09:28:11.000000000 Z\n updated_at: 2014-11-05 09:28:12.196513000 Z\n"], ["run_at", "2014-11-05 09:28:22.207456"], ["updated_at", "2014-11-05 09:28:12.228897"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:28:18', '2014-11-05 09:28:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:18', '2014-11-05 09:28:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:18', '2014-11-05 09:28:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:18', '2014-11-05 09:28:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:18', '2014-11-05 09:28:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:28:18', '2014-11-05 09:28:18', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 42ms (Views: 1.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 0.8ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '454948c0beedd75671863008b761e11d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:28:18.227113"], ["extension", "txt"], ["name", "footest barish"], ["token", "454948c0beedd75671863008b761e11d"], ["updated_at", "2014-11-05 09:28:18.227113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:18.236268"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 09:28:18.236268"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.3ms)  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 09:28:18.349154"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:18.369507"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 09:28:18.000000000 Z\n updated_at: 2014-11-05 09:28:18.349154000 Z\n"], ["run_at", "2014-11-05 09:28:28.355072"], ["updated_at", "2014-11-05 09:28:18.369507"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 09:28:18.604408"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.8ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 09:28:19.075231"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:19.097487"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-05 09:28:18.000000000 Z\n updated_at: 2014-11-05 09:28:19.075231000 Z\n"], ["run_at", "2014-11-05 09:28:29.081097"], ["updated_at", "2014-11-05 09:28:19.097487"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:28:19', '2014-11-05 09:28:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd9438d4b4e2e563fd40d4d583f6e2d5e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:28:19.260678"], ["extension", "txt"], ["name", "Test"], ["token", "d9438d4b4e2e563fd40d4d583f6e2d5e"], ["updated_at", "2014-11-05 09:28:19.260678"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9ac0cd5373fb79d2ab8795bf150228b3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:28:19.265270"], ["extension", "txt"], ["name", "Test"], ["token", "9ac0cd5373fb79d2ab8795bf150228b3"], ["updated_at", "2014-11-05 09:28:19.265270"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c37cfe8fc1e7600a4a8b6fedb775781a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:28:19.271675"], ["extension", "txt"], ["name", "Test"], ["token", "c37cfe8fc1e7600a4a8b6fedb775781a"], ["updated_at", "2014-11-05 09:28:19.271675"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fbc3f7e4243600bdb362782be3c083ee' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:28:19.274585"], ["extension", "txt"], ["name", "Test"], ["token", "fbc3f7e4243600bdb362782be3c083ee"], ["updated_at", "2014-11-05 09:28:19.274585"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f9d8fbffbea891d2418cffe327ee2bfa' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 09:28:19.278744"], ["extension", "txt"], ["name", "Test"], ["token", "f9d8fbffbea891d2418cffe327ee2bfa"], ["updated_at", "2014-11-05 09:28:19.278744"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:28:19.295111"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 09:28:19.390601"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:19.412907"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 09:28:19.412483"], ["updated_at", "2014-11-05 09:28:19.412907"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:28:19', '2014-11-05 09:28:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:19', '2014-11-05 09:28:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:28:19', '2014-11-05 09:28:19', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b6e0b9a60261d84dfd29d7eed177bf0d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 09:28:19.574739"], ["extension", "png"], ["name", "Dummy"], ["token", "b6e0b9a60261d84dfd29d7eed177bf0d"], ["updated_at", "2014-11-05 09:28:19.574739"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 09:28:19.772860"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:19.788303"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 09:28:19.788044"], ["updated_at", "2014-11-05 09:28:19.788303"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:28:20', '2014-11-05 09:28:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 09:28:20.250382"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 09:28:20.353947"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:20.373051"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 09:28:20.372778"], ["updated_at", "2014-11-05 09:28:20.373051"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 30ms (Views: 2.7ms | ActiveRecord: 3.8ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 09:28:20', '2014-11-05 09:28:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 09:28:20', '2014-11-05 09:28:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 09:28:20', '2014-11-05 09:28:20', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 09:28:20.546609"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:20.551429"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 09:28:20.551429"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 09:28:20.553897"], ["name", "test"], ["updated_at", "2014-11-05 09:28:20.553897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 09:28:20.561429"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 09:28:20.565902"], ["name", "test"], ["updated_at", "2014-11-05 09:28:20.565902"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 09:28:20.572597"], ["name", "test"], ["updated_at", "2014-11-05 09:28:20.572597"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:20.573909"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 09:28:20.573909"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 09:28:20.574862"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 09:28:20.574862"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 09:28:20.583290"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:35:22', '2014-11-05 10:35:22', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:22', '2014-11-05 10:35:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:22', '2014-11-05 10:35:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:22', '2014-11-05 10:35:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:22', '2014-11-05 10:35:22', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:35:22', '2014-11-05 10:35:22', 948421225)  (0.7ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 10:35:23.025840"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:23.041010"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 10:35:23.041010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 10:35:23.043953"], ["name", "test"], ["updated_at", "2014-11-05 10:35:23.043953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 10:35:23.147327"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:23.168998"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 10:35:23.168436"], ["updated_at", "2014-11-05 10:35:23.168998"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:35:23', '2014-11-05 10:35:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bb1d7b7474922c175dc7f121136eab30' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 10:35:23.576416"], ["extension", "png"], ["name", "Dummy"], ["token", "bb1d7b7474922c175dc7f121136eab30"], ["updated_at", "2014-11-05 10:35:23.576416"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.9ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 10:35:23.630684"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 10:35:23.635000"], ["name", "test"], ["updated_at", "2014-11-05 10:35:23.635000"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 10:35:23.639471"], ["name", "test"], ["updated_at", "2014-11-05 10:35:23.639471"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:23.640442"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 10:35:23.640442"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:23.641824"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 10:35:23.641824"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 10:35:23.649178"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 10:35:23.744808"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:23.765790"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 10:35:23.765464"], ["updated_at", "2014-11-05 10:35:23.765790"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 32ms (Views: 1.9ms | ActiveRecord: 2.9ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:35:23', '2014-11-05 10:35:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:23', '2014-11-05 10:35:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:35:23', '2014-11-05 10:35:23', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8729ef125b1c90f1e3671c46ff305540' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:35:23.956045"], ["extension", "txt"], ["name", "Test"], ["token", "8729ef125b1c90f1e3671c46ff305540"], ["updated_at", "2014-11-05 10:35:23.956045"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'efb7b5febc21c401c558b24f1969db8f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:35:23.959137"], ["extension", "txt"], ["name", "Test"], ["token", "efb7b5febc21c401c558b24f1969db8f"], ["updated_at", "2014-11-05 10:35:23.959137"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '90fb130074763918d6d826f6d74f2e00' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:35:23.965194"], ["extension", "txt"], ["name", "Test"], ["token", "90fb130074763918d6d826f6d74f2e00"], ["updated_at", "2014-11-05 10:35:23.965194"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bfc417770c3896ea1b93de70fb33c5dc' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:35:23.967735"], ["extension", "txt"], ["name", "Test"], ["token", "bfc417770c3896ea1b93de70fb33c5dc"], ["updated_at", "2014-11-05 10:35:23.967735"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e6144e4899c165c1c149119c9d0e23a2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:35:23.971095"], ["extension", "txt"], ["name", "Test"], ["token", "e6144e4899c165c1c149119c9d0e23a2"], ["updated_at", "2014-11-05 10:35:23.971095"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 10:35:23.978055"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 10:35:24.132921"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:24.149402"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 10:35:24.149070"], ["updated_at", "2014-11-05 10:35:24.149402"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:35:24', '2014-11-05 10:35:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:24', '2014-11-05 10:35:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:24', '2014-11-05 10:35:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:24', '2014-11-05 10:35:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:24', '2014-11-05 10:35:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:35:24', '2014-11-05 10:35:24', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 10:35:24.419654"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:24.440294"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 10:35:24.000000000 Z\n updated_at: 2014-11-05 10:35:24.419654000 Z\n"], ["run_at", "2014-11-05 10:35:34.424088"], ["updated_at", "2014-11-05 10:35:24.440294"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 10:35:24.675140"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 10:35:25.144382"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:25.166922"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-05 10:35:24.000000000 Z\n updated_at: 2014-11-05 10:35:25.144382000 Z\n"], ["run_at", "2014-11-05 10:35:35.152111"], ["updated_at", "2014-11-05 10:35:25.166922"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:35:25', '2014-11-05 10:35:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:25', '2014-11-05 10:35:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:25', '2014-11-05 10:35:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:25', '2014-11-05 10:35:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:35:25', '2014-11-05 10:35:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:35:25', '2014-11-05 10:35:25', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 10:35:25.346343"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 0.9ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd417693945991e9bf5418e2b311c8b21' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:35:25.375952"], ["extension", "txt"], ["name", "footest barish"], ["token", "d417693945991e9bf5418e2b311c8b21"], ["updated_at", "2014-11-05 10:35:25.375952"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:35:25.378344"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 10:35:25.378344"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:43:37', '2014-11-05 10:43:37', 538821867) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-05 10:43:37.226843"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:37.242897"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-05 10:43:37.242897"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 10:43:37.245149"], ["name", "test"], ["updated_at", "2014-11-05 10:43:37.245149"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 1.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a4677400d09e152aa6357ac29d034d6f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:43:37.297801"], ["extension", "txt"], ["name", "footest barish"], ["token", "a4677400d09e152aa6357ac29d034d6f"], ["updated_at", "2014-11-05 10:43:37.297801"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:37.304654"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-05 10:43:37.304654"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '38d1d5235a38aefffe3335483125fbba' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:43:37.326777"], ["extension", "txt"], ["name", "Test"], ["token", "38d1d5235a38aefffe3335483125fbba"], ["updated_at", "2014-11-05 10:43:37.326777"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f812ffe4d5f8d2ed101095f410150959' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:43:37.329728"], ["extension", "txt"], ["name", "Test"], ["token", "f812ffe4d5f8d2ed101095f410150959"], ["updated_at", "2014-11-05 10:43:37.329728"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'be1cc2f6bf880b2a0ff350d6d37280ac' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:43:37.334034"], ["extension", "txt"], ["name", "Test"], ["token", "be1cc2f6bf880b2a0ff350d6d37280ac"], ["updated_at", "2014-11-05 10:43:37.334034"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '92ae40368d83eb87ad29d19ae6542de4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:43:37.336388"], ["extension", "txt"], ["name", "Test"], ["token", "92ae40368d83eb87ad29d19ae6542de4"], ["updated_at", "2014-11-05 10:43:37.336388"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '868ae300c2ce1411805b4513f325fbf2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-05 10:43:37.339497"], ["extension", "txt"], ["name", "Test"], ["token", "868ae300c2ce1411805b4513f325fbf2"], ["updated_at", "2014-11-05 10:43:37.339497"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 10:43:37.346276"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 10:43:37.455763"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:37.477511"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 10:43:37.476745"], ["updated_at", "2014-11-05 10:43:37.477511"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:43:37', '2014-11-05 10:43:37', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:37', '2014-11-05 10:43:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:43:37', '2014-11-05 10:43:37', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-05 10:43:37.641858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 10:43:37.735746"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:37.759543"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-05 10:43:37.000000000 Z\n updated_at: 2014-11-05 10:43:37.735746000 Z\n"], ["run_at", "2014-11-05 10:43:47.739514"], ["updated_at", "2014-11-05 10:43:37.759543"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-05 10:43:37.984346"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-05 10:43:38.438986"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:38.469703"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-05 10:43:37.000000000 Z\n updated_at: 2014-11-05 10:43:38.438986000 Z\n"], ["run_at", "2014-11-05 10:43:48.447492"], ["updated_at", "2014-11-05 10:43:38.469703"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:43:38', '2014-11-05 10:43:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-05 10:43:38.627981"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 10:43:38.788025"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:38.804736"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 10:43:38.804401"], ["updated_at", "2014-11-05 10:43:38.804736"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 27ms (Views: 2.2ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:43:38', '2014-11-05 10:43:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:38', '2014-11-05 10:43:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:43:38', '2014-11-05 10:43:38', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 42ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd114c770e89bdce133b92159f930de5c' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-05 10:43:39.031024"], ["extension", "png"], ["name", "Dummy"], ["token", "d114c770e89bdce133b92159f930de5c"], ["updated_at", "2014-11-05 10:43:39.031024"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-05 10:43:39.141784"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:39.162646"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-05 10:43:39.162356"], ["updated_at", "2014-11-05 10:43:39.162646"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-05 10:43:39', '2014-11-05 10:43:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:39', '2014-11-05 10:43:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:39', '2014-11-05 10:43:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:39', '2014-11-05 10:43:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-05 10:43:39', '2014-11-05 10:43:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-05 10:43:39', '2014-11-05 10:43:39', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-05 10:43:39.563969"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 10:43:39.570025"], ["name", "test"], ["updated_at", "2014-11-05 10:43:39.570025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-05 10:43:39.576512"], ["name", "test"], ["updated_at", "2014-11-05 10:43:39.576512"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:39.577680"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-05 10:43:39.577680"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-05 10:43:39.578707"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-05 10:43:39.578707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:23:01', '2014-11-06 08:23:01', 538821867) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a786246a11baeaf3e4de37ba8e24507b' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:23:01.438053"], ["extension", "txt"], ["name", "Test"], ["token", "a786246a11baeaf3e4de37ba8e24507b"], ["updated_at", "2014-11-06 08:23:01.438053"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '637e1fb9782291a8ae2a6db4a6606dc0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:23:01.443620"], ["extension", "txt"], ["name", "Test"], ["token", "637e1fb9782291a8ae2a6db4a6606dc0"], ["updated_at", "2014-11-06 08:23:01.443620"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd82c75517baa589d3d3802b24ef42433' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:23:01.450226"], ["extension", "txt"], ["name", "Test"], ["token", "d82c75517baa589d3d3802b24ef42433"], ["updated_at", "2014-11-06 08:23:01.450226"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '494925f1e1ce57dd1063b63b606ebcd6' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:23:01.453690"], ["extension", "txt"], ["name", "Test"], ["token", "494925f1e1ce57dd1063b63b606ebcd6"], ["updated_at", "2014-11-06 08:23:01.453690"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1be61a8734576f2a1dc365602d05d62e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:23:01.457775"], ["extension", "txt"], ["name", "Test"], ["token", "1be61a8734576f2a1dc365602d05d62e"], ["updated_at", "2014-11-06 08:23:01.457775"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-06 08:23:01.481415"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 08:23:01.589816"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:01.612897"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 08:23:01.612591"], ["updated_at", "2014-11-06 08:23:01.612897"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:23:01', '2014-11-06 08:23:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:01', '2014-11-06 08:23:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:23:01', '2014-11-06 08:23:01', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-06 08:23:01.819173"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 08:23:01.824087"], ["name", "test"], ["updated_at", "2014-11-06 08:23:01.824087"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 08:23:01.828460"], ["name", "test"], ["updated_at", "2014-11-06 08:23:01.828460"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:01.829311"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-06 08:23:01.829311"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:01.830259"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-06 08:23:01.830259"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 08:23:01.936262"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:01.955264"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 08:23:01.954960"], ["updated_at", "2014-11-06 08:23:01.955264"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:23:02', '2014-11-06 08:23:02', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-06 08:23:02.331558"], ["width", 800]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 08:23:02.422005"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:02.441963"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 08:23:02.441617"], ["updated_at", "2014-11-06 08:23:02.441963"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 31ms (Views: 2.2ms | ActiveRecord: 3.2ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:23:02', '2014-11-06 08:23:02', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:23:02', '2014-11-06 08:23:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:23:02', '2014-11-06 08:23:02', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-06 08:23:02.610247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-06 08:23:02.622044"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:02.627521"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-06 08:23:02.627521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 08:23:02.629876"], ["name", "test"], ["updated_at", "2014-11-06 08:23:02.629876"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 0.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7a9d4e9d155a8c27be4a6b9e4c9246f3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:23:02.658296"], ["extension", "txt"], ["name", "footest barish"], ["token", "7a9d4e9d155a8c27be4a6b9e4c9246f3"], ["updated_at", "2014-11-06 08:23:02.658296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:02.660687"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-06 08:23:02.660687"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1bceea2ff92f54e1952e231996d4c131' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-06 08:23:02.727059"], ["extension", "png"], ["name", "Dummy"], ["token", "1bceea2ff92f54e1952e231996d4c131"], ["updated_at", "2014-11-06 08:23:02.727059"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-06 08:23:02.838301"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:02.857493"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-06 08:23:02.000000000 Z\n updated_at: 2014-11-06 08:23:02.838301000 Z\n"], ["run_at", "2014-11-06 08:23:12.841688"], ["updated_at", "2014-11-06 08:23:02.857493"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-06 08:23:03.088766"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-06 08:23:03.543304"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:23:03.566018"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-06 08:23:02.000000000 Z\n updated_at: 2014-11-06 08:23:03.543304000 Z\n"], ["run_at", "2014-11-06 08:23:13.551239"], ["updated_at", "2014-11-06 08:23:03.566018"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:42:41', '2014-11-06 08:42:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:41', '2014-11-06 08:42:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:41', '2014-11-06 08:42:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:41', '2014-11-06 08:42:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:41', '2014-11-06 08:42:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:42:41', '2014-11-06 08:42:41', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 37ms (Views: 1.4ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 0.8ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '12863bae7377fb3c93db3301e7abe4a5' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:42:41.174624"], ["extension", "txt"], ["name", "footest barish"], ["token", "12863bae7377fb3c93db3301e7abe4a5"], ["updated_at", "2014-11-06 08:42:41.174624"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:41.181839"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-06 08:42:41.181839"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-06 08:42:41.284878"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:41.305717"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-06 08:42:41.000000000 Z\n updated_at: 2014-11-06 08:42:41.284878000 Z\n"], ["run_at", "2014-11-06 08:42:51.290188"], ["updated_at", "2014-11-06 08:42:41.305717"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-06 08:42:41.536506"], ["width", 800]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-06 08:42:41.994314"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:42.013579"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-06 08:42:41.000000000 Z\n updated_at: 2014-11-06 08:42:41.994314000 Z\n"], ["run_at", "2014-11-06 08:42:51.999589"], ["updated_at", "2014-11-06 08:42:42.013579"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:42:42', '2014-11-06 08:42:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-06 08:42:42.193230"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-06 08:42:42.204402"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 08:42:42.214139"], ["name", "test"], ["updated_at", "2014-11-06 08:42:42.214139"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 08:42:42.218890"], ["name", "test"], ["updated_at", "2014-11-06 08:42:42.218890"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:42.219804"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-06 08:42:42.219804"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:42.220646"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-06 08:42:42.220646"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a3e05d7115f06c6e9e0559c36a55a101' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:42:42.225165"], ["extension", "txt"], ["name", "Test"], ["token", "a3e05d7115f06c6e9e0559c36a55a101"], ["updated_at", "2014-11-06 08:42:42.225165"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd9176395483bebfd497ad0364396b7ff' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:42:42.227834"], ["extension", "txt"], ["name", "Test"], ["token", "d9176395483bebfd497ad0364396b7ff"], ["updated_at", "2014-11-06 08:42:42.227834"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6404b868e5d3ff7fe5719770417a7f36' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:42:42.233275"], ["extension", "txt"], ["name", "Test"], ["token", "6404b868e5d3ff7fe5719770417a7f36"], ["updated_at", "2014-11-06 08:42:42.233275"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd835408391e9ef864c2721180d2d584e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:42:42.236005"], ["extension", "txt"], ["name", "Test"], ["token", "d835408391e9ef864c2721180d2d584e"], ["updated_at", "2014-11-06 08:42:42.236005"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd5793ef2a12b7fdfbe0a2190c90f84c8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 08:42:42.239374"], ["extension", "txt"], ["name", "Test"], ["token", "d5793ef2a12b7fdfbe0a2190c90f84c8"], ["updated_at", "2014-11-06 08:42:42.239374"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-06 08:42:42.246238"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 08:42:42.342107"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:42.365640"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 08:42:42.365315"], ["updated_at", "2014-11-06 08:42:42.365640"]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:42:42', '2014-11-06 08:42:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:42', '2014-11-06 08:42:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:42:42', '2014-11-06 08:42:42', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-06 08:42:42.521891"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:42.528116"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-06 08:42:42.528116"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 08:42:42.531114"], ["name", "test"], ["updated_at", "2014-11-06 08:42:42.531114"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5c5321da139cc2ea9f327ac31ff404a7' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-06 08:42:42.539872"], ["extension", "png"], ["name", "Dummy"], ["token", "5c5321da139cc2ea9f327ac31ff404a7"], ["updated_at", "2014-11-06 08:42:42.539872"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 08:42:42.718926"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:42.733471"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 08:42:42.733068"], ["updated_at", "2014-11-06 08:42:42.733471"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 132093124) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:42:43', '2014-11-06 08:42:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-06 08:42:43.224484"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 08:42:43.317836"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 08:42:43.333408"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 08:42:43.333066"], ["updated_at", "2014-11-06 08:42:43.333408"]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 25ms (Views: 2.1ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 08:42:43', '2014-11-06 08:42:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 08:42:43', '2014-11-06 08:42:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 08:42:43', '2014-11-06 08:42:43', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 14:34:34', '2014-11-06 14:34:34', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:34', '2014-11-06 14:34:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:34', '2014-11-06 14:34:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:34', '2014-11-06 14:34:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:34', '2014-11-06 14:34:34', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 14:34:34', '2014-11-06 14:34:34', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-06 14:34:34.490642"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:34.511867"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-06 14:34:34.000000000 Z\n updated_at: 2014-11-06 14:34:34.490642000 Z\n"], ["run_at", "2014-11-06 14:34:44.496461"], ["updated_at", "2014-11-06 14:34:34.511867"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-06 14:34:34.740510"], ["width", 800]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-06 14:34:35.204898"]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:35.232600"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-06 14:34:34.000000000 Z\n updated_at: 2014-11-06 14:34:35.204898000 Z\n"], ["run_at", "2014-11-06 14:34:45.215108"], ["updated_at", "2014-11-06 14:34:35.232600"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 14:34:35', '2014-11-06 14:34:35', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-06 14:34:35.405850"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.2ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 14:34:35.507937"]]  (1.0ms) commit transaction  (0.3ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:35.528791"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 14:34:35.528346"], ["updated_at", "2014-11-06 14:34:35.528791"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 35ms (Views: 3.0ms | ActiveRecord: 4.1ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 14:34:35', '2014-11-06 14:34:35', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:35', '2014-11-06 14:34:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 14:34:35', '2014-11-06 14:34:35', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-06 14:34:35.696908"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dc3d0768bd2c4a932819958b9a337d13' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-06 14:34:35.710268"], ["extension", "png"], ["name", "Dummy"], ["token", "dc3d0768bd2c4a932819958b9a337d13"], ["updated_at", "2014-11-06 14:34:35.710268"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.6ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 12ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2ee70e6854dbc13a800786bbf2c9be85' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 14:34:35.748456"], ["extension", "txt"], ["name", "Test"], ["token", "2ee70e6854dbc13a800786bbf2c9be85"], ["updated_at", "2014-11-06 14:34:35.748456"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '75c572f6839b898ea33508dd41b3faad' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 14:34:35.752087"], ["extension", "txt"], ["name", "Test"], ["token", "75c572f6839b898ea33508dd41b3faad"], ["updated_at", "2014-11-06 14:34:35.752087"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2954f14712345eabd378e2e8d92b572e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 14:34:35.760509"], ["extension", "txt"], ["name", "Test"], ["token", "2954f14712345eabd378e2e8d92b572e"], ["updated_at", "2014-11-06 14:34:35.760509"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f4a2c100baf44bbde2119ba29cba2121' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 14:34:35.764257"], ["extension", "txt"], ["name", "Test"], ["token", "f4a2c100baf44bbde2119ba29cba2121"], ["updated_at", "2014-11-06 14:34:35.764257"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd447bde5352c415adc729a02e4e16e17' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 14:34:35.767566"], ["extension", "txt"], ["name", "Test"], ["token", "d447bde5352c415adc729a02e4e16e17"], ["updated_at", "2014-11-06 14:34:35.767566"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-06 14:34:35.774499"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 14:34:35.873172"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:35.891772"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 14:34:35.891380"], ["updated_at", "2014-11-06 14:34:35.891772"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 14:34:36', '2014-11-06 14:34:36', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 419883833, 624739301, 701625837) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 948421225)  (1.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-06 14:34:36.050311"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:36.065606"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-06 14:34:36.065606"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 14:34:36.068992"], ["name", "test"], ["updated_at", "2014-11-06 14:34:36.068992"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 27ms (Views: 1.3ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd1f782168691beae9903b132c1fdc107' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-06 14:34:36.172332"], ["extension", "txt"], ["name", "footest barish"], ["token", "d1f782168691beae9903b132c1fdc107"], ["updated_at", "2014-11-06 14:34:36.172332"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:36.178576"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-06 14:34:36.178576"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-06 14:34:36.288972"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:36.307743"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-06 14:34:36.307433"], ["updated_at", "2014-11-06 14:34:36.307743"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-06 14:34:36', '2014-11-06 14:34:36', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-06 14:34:36', '2014-11-06 14:34:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-06 14:34:36', '2014-11-06 14:34:36', 948421225)  (5.6ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-06 14:34:36.728384"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 14:34:36.733702"], ["name", "test"], ["updated_at", "2014-11-06 14:34:36.733702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-06 14:34:36.739357"], ["name", "test"], ["updated_at", "2014-11-06 14:34:36.739357"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:36.740391"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-06 14:34:36.740391"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-06 14:34:36.741626"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-06 14:34:36.741626"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:05:09', '2014-11-17 13:05:09', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 39ms (Views: 38.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:05:09.172953"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:09.186108"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:05:09.186108"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:05:09.188339"], ["name", "test"], ["updated_at", "2014-11-17 13:05:09.188339"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:05:09.209813"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:05:09.214752"], ["name", "test"], ["updated_at", "2014-11-17 13:05:09.214752"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:05:09.220278"], ["name", "test"], ["updated_at", "2014-11-17 13:05:09.220278"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:09.221162"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:05:09.221162"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:09.222210"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:05:09.222210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:05:09.230516"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f5b32b160526c012b3d2c2e18049b0d4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:05:09.254191"], ["extension", "png"], ["name", "Dummy"], ["token", "f5b32b160526c012b3d2c2e18049b0d4"], ["updated_at", "2014-11-17 13:05:09.254191"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '768e616d6be82742c7c67b54e352f550' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:05:09.283034"], ["extension", "txt"], ["name", "Test"], ["token", "768e616d6be82742c7c67b54e352f550"], ["updated_at", "2014-11-17 13:05:09.283034"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b72ab193e3f69503376f8bc144bf7d7e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:05:09.285698"], ["extension", "txt"], ["name", "Test"], ["token", "b72ab193e3f69503376f8bc144bf7d7e"], ["updated_at", "2014-11-17 13:05:09.285698"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3f20775872fc8543b5ad441ca0895dd1' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:05:09.291042"], ["extension", "txt"], ["name", "Test"], ["token", "3f20775872fc8543b5ad441ca0895dd1"], ["updated_at", "2014-11-17 13:05:09.291042"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5c2bad5a1a377daeaab80bcdc75f916e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:05:09.293746"], ["extension", "txt"], ["name", "Test"], ["token", "5c2bad5a1a377daeaab80bcdc75f916e"], ["updated_at", "2014-11-17 13:05:09.293746"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '32f487330a10a8d4c2918b1f60285ee0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:05:09.297422"], ["extension", "txt"], ["name", "Test"], ["token", "32f487330a10a8d4c2918b1f60285ee0"], ["updated_at", "2014-11-17 13:05:09.297422"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:05:09.303243"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:05:09.466742"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:09.502116"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:05:09.501454"], ["updated_at", "2014-11-17 13:05:09.502116"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 68463692) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:05:09', '2014-11-17 13:05:09', 538821867) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:09', '2014-11-17 13:05:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:05:09', '2014-11-17 13:05:09', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (1.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:05:09.936116"]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:09.975487"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:05:09.000000000 Z\n updated_at: 2014-11-17 13:05:09.936116000 Z\n"], ["run_at", "2014-11-17 13:05:19.947068"], ["updated_at", "2014-11-17 13:05:09.975487"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:05:10.199771"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:05:10.655377"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:10.686578"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:05:09.000000000 Z\n updated_at: 2014-11-17 13:05:10.655377000 Z\n"], ["run_at", "2014-11-17 13:05:20.663506"], ["updated_at", "2014-11-17 13:05:10.686578"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:05:10', '2014-11-17 13:05:10', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:10', '2014-11-17 13:05:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:10', '2014-11-17 13:05:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:10', '2014-11-17 13:05:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:10', '2014-11-17 13:05:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:05:10', '2014-11-17 13:05:10', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:05:10.929906"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:10.945597"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:05:10.945276"], ["updated_at", "2014-11-17 13:05:10.945597"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:05:11', '2014-11-17 13:05:11', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 849405871, 624739301, 819504217) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:05:11.323867"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:05:11.415503"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:11.429683"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:05:11.429401"], ["updated_at", "2014-11-17 13:05:11.429683"]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 24ms (Views: 1.8ms | ActiveRecord: 2.8ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:05:11', '2014-11-17 13:05:11', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:11', '2014-11-17 13:05:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:05:11', '2014-11-17 13:05:11', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 1.2ms | ActiveRecord: 0.4ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0491f0d8d6d9dae6f6cd32aeeaacc486' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:05:11.631568"], ["extension", "txt"], ["name", "footest barish"], ["token", "0491f0d8d6d9dae6f6cd32aeeaacc486"], ["updated_at", "2014-11-17 13:05:11.631568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:11.634214"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:05:11.634214"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:05:50', '2014-11-17 13:05:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:50', '2014-11-17 13:05:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:50', '2014-11-17 13:05:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:50', '2014-11-17 13:05:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:05:50', '2014-11-17 13:05:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:05:50', '2014-11-17 13:05:50', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:05:50.507701"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:50.528813"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:05:50.000000000 Z\n updated_at: 2014-11-17 13:05:50.507701000 Z\n"], ["run_at", "2014-11-17 13:06:00.513067"], ["updated_at", "2014-11-17 13:05:50.528813"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:05:50.759602"], ["width", 800]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.8ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:05:51.235670"]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:05:51.264960"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:05:50.000000000 Z\n updated_at: 2014-11-17 13:05:51.235670000 Z\n"], ["run_at", "2014-11-17 13:06:01.248541"], ["updated_at", "2014-11-17 13:05:51.264960"]]  (1.1ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:06:17', '2014-11-17 13:06:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:06:17', '2014-11-17 13:06:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:06:17', '2014-11-17 13:06:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:06:17', '2014-11-17 13:06:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:06:17', '2014-11-17 13:06:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:06:17', '2014-11-17 13:06:17', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:06:18.026879"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:06:18.047745"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:06:18.047370"], ["updated_at", "2014-11-17 13:06:18.047745"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:08:14', '2014-11-17 13:08:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:14', '2014-11-17 13:08:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:14', '2014-11-17 13:08:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:14', '2014-11-17 13:08:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:14', '2014-11-17 13:08:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:08:14', '2014-11-17 13:08:14', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:08:14.970607"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:08:14.996037"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:08:14.995609"], ["updated_at", "2014-11-17 13:08:14.996037"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:08:43', '2014-11-17 13:08:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:43', '2014-11-17 13:08:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:43', '2014-11-17 13:08:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:43', '2014-11-17 13:08:43', 98413728, 245026679, 784085492) Fixture Insert (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:08:43', '2014-11-17 13:08:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:08:43', '2014-11-17 13:08:43', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:08:43.187799"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:08:43.207173"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:08:43.206811"], ["updated_at", "2014-11-17 13:08:43.207173"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:09:06', '2014-11-17 13:09:06', 538821867) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:09:06.398259"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 0.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:09:06.547185"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:06.563765"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:09:06.563505"], ["updated_at", "2014-11-17 13:09:06.563765"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 30ms (Views: 3.0ms | ActiveRecord: 3.2ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:09:06', '2014-11-17 13:09:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:06', '2014-11-17 13:09:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:09:06', '2014-11-17 13:09:06', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 27ms (Views: 0.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '78afd819c3c1ddb7ebdabced477b977a' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:09:06.792117"], ["extension", "txt"], ["name", "footest barish"], ["token", "78afd819c3c1ddb7ebdabced477b977a"], ["updated_at", "2014-11-17 13:09:06.792117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:06.802878"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:09:06.802878"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:09:06.911960"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:06.933121"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:09:06.000000000 Z\n updated_at: 2014-11-17 13:09:06.911960000 Z\n"], ["run_at", "2014-11-17 13:09:16.915856"], ["updated_at", "2014-11-17 13:09:06.933121"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:09:07.139047"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:09:07.599141"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:07.621602"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:09:06.000000000 Z\n updated_at: 2014-11-17 13:09:07.599141000 Z\n"], ["run_at", "2014-11-17 13:09:17.602353"], ["updated_at", "2014-11-17 13:09:07.621602"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:09:07', '2014-11-17 13:09:07', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:07', '2014-11-17 13:09:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:07', '2014-11-17 13:09:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:07', '2014-11-17 13:09:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:07', '2014-11-17 13:09:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:09:07', '2014-11-17 13:09:07', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:09:07.773091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2a415ad5b15e6303fc097b5ce90af489' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:09:07.785813"], ["extension", "txt"], ["name", "Test"], ["token", "2a415ad5b15e6303fc097b5ce90af489"], ["updated_at", "2014-11-17 13:09:07.785813"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a9c77b213f36b7420745b19568492e6c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:09:07.789675"], ["extension", "txt"], ["name", "Test"], ["token", "a9c77b213f36b7420745b19568492e6c"], ["updated_at", "2014-11-17 13:09:07.789675"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fd0635889d79dcdc861de029e0307c55' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:09:07.795152"], ["extension", "txt"], ["name", "Test"], ["token", "fd0635889d79dcdc861de029e0307c55"], ["updated_at", "2014-11-17 13:09:07.795152"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0ae0105e6dd5eebeaace780d17fac1c9' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:09:07.798695"], ["extension", "txt"], ["name", "Test"], ["token", "0ae0105e6dd5eebeaace780d17fac1c9"], ["updated_at", "2014-11-17 13:09:07.798695"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e993738e11fa74240462066189039460' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:09:07.802682"], ["extension", "txt"], ["name", "Test"], ["token", "e993738e11fa74240462066189039460"], ["updated_at", "2014-11-17 13:09:07.802682"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:09:07.818339"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:09:07.978945"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:07.995287"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:09:07.994928"], ["updated_at", "2014-11-17 13:09:07.995287"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:09:08', '2014-11-17 13:09:08', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7a3b229478e8fe38a3d42b66f8759bfb' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:09:08.139707"], ["extension", "png"], ["name", "Dummy"], ["token", "7a3b229478e8fe38a3d42b66f8759bfb"], ["updated_at", "2014-11-17 13:09:08.139707"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:09:08.225577"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:09:08.229900"], ["name", "test"], ["updated_at", "2014-11-17 13:09:08.229900"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:09:08.234581"], ["name", "test"], ["updated_at", "2014-11-17 13:09:08.234581"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:08.235686"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:09:08.235686"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:08.236774"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:09:08.236774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:09:08.325578"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:08.341363"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:09:08.341105"], ["updated_at", "2014-11-17 13:09:08.341363"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:09:08', '2014-11-17 13:09:08', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:09:08', '2014-11-17 13:09:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:09:08', '2014-11-17 13:09:08', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:09:08.722994"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:09:08.728424"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:09:08.728424"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:09:08.731247"], ["name", "test"], ["updated_at", "2014-11-17 13:09:08.731247"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:12:08', '2014-11-17 13:12:08', 538821867) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:12:08.471476"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:08.527055"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:12:08.527055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:12:08.529298"], ["name", "test"], ["updated_at", "2014-11-17 13:12:08.529298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:12:08.552689"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:12:08.556752"], ["name", "test"], ["updated_at", "2014-11-17 13:12:08.556752"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:12:08.561140"], ["name", "test"], ["updated_at", "2014-11-17 13:12:08.561140"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:08.562153"], ["movie_id", 980190963], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:12:08.562153"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:08.563032"], ["movie_id", 980190963], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:12:08.563032"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:12:08.572605"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:12:08.693232"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (2.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:08.712859"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:12:08.711810"], ["updated_at", "2014-11-17 13:12:08.712859"]]  (1.1ms) commit transaction  (0.2ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 38ms (Views: 3.2ms | ActiveRecord: 5.6ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:12:08', '2014-11-17 13:12:08', 538821867) Fixture Delete (1.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 153115190) Fixture Delete (1.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:08', '2014-11-17 13:12:08', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:12:08', '2014-11-17 13:12:08', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:12:09.008760"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:09.030564"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:12:09.030187"], ["updated_at", "2014-11-17 13:12:09.030564"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:12:09', '2014-11-17 13:12:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:09', '2014-11-17 13:12:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:09', '2014-11-17 13:12:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:09', '2014-11-17 13:12:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:09', '2014-11-17 13:12:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:12:09', '2014-11-17 13:12:09', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4e6ef1b34551da48b2d28eb05e9828bb' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:12:09.406910"], ["extension", "png"], ["name", "Dummy"], ["token", "4e6ef1b34551da48b2d28eb05e9828bb"], ["updated_at", "2014-11-17 13:12:09.406910"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.5ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:12:09.446213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:12:09.539157"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:09.558842"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:12:09.000000000 Z\n updated_at: 2014-11-17 13:12:09.539157000 Z\n"], ["run_at", "2014-11-17 13:12:19.542709"], ["updated_at", "2014-11-17 13:12:09.558842"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:12:09.774541"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:12:10.215085"]]  (5.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:10.242781"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:12:09.000000000 Z\n updated_at: 2014-11-17 13:12:10.215085000 Z\n"], ["run_at", "2014-11-17 13:12:20.223748"], ["updated_at", "2014-11-17 13:12:10.242781"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:12:10', '2014-11-17 13:12:10', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 14ms (Views: 1.3ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '212212339ed61a7c4b75953214e7d8fe' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:12:10.424912"], ["extension", "txt"], ["name", "footest barish"], ["token", "212212339ed61a7c4b75953214e7d8fe"], ["updated_at", "2014-11-17 13:12:10.424912"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:10.427790"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:12:10.427790"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6e8bd5aa036f3f68accf2347abc304e7' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:12:10.448768"], ["extension", "txt"], ["name", "Test"], ["token", "6e8bd5aa036f3f68accf2347abc304e7"], ["updated_at", "2014-11-17 13:12:10.448768"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dfcffc4c1594197a8be2231ce4844dc0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:12:10.452927"], ["extension", "txt"], ["name", "Test"], ["token", "dfcffc4c1594197a8be2231ce4844dc0"], ["updated_at", "2014-11-17 13:12:10.452927"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fcf15b7f952cd95b2f2952796961641e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:12:10.458041"], ["extension", "txt"], ["name", "Test"], ["token", "fcf15b7f952cd95b2f2952796961641e"], ["updated_at", "2014-11-17 13:12:10.458041"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '62687636f2447b4b271358c08324232f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:12:10.460655"], ["extension", "txt"], ["name", "Test"], ["token", "62687636f2447b4b271358c08324232f"], ["updated_at", "2014-11-17 13:12:10.460655"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ab2073273777563a47735050b5610dff' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:12:10.464133"], ["extension", "txt"], ["name", "Test"], ["token", "ab2073273777563a47735050b5610dff"], ["updated_at", "2014-11-17 13:12:10.464133"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:12:10.470470"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:12:10.553437"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:12:10.571053"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:12:10.570657"], ["updated_at", "2014-11-17 13:12:10.571053"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:12:10', '2014-11-17 13:12:10', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:12:10', '2014-11-17 13:12:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:12:10', '2014-11-17 13:12:10', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (2.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.4ms) select sqlite_version(*)  (0.7ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.2ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.1ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.4ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (1.3ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (1.8ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.1ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime) SQLite3::SQLException: table "images" already exists: CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.0ms) rollback transaction  (1.4ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.9ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.0ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.6ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.6ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "images"  (0.2ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.7ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.1ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  SQLite3::SQLException: table "movies" already exists: CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.0ms) rollback transaction  (5.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.8ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.8ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.3ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.4ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.9ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.4ms) DROP TABLE "images"  (0.2ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.9ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "movies"  (0.1ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.8ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "movie_fogged_resources"  (0.1ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.8ms) commit transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:19:59', '2014-11-17 13:19:59', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:19:59', '2014-11-17 13:19:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:19:59', '2014-11-17 13:19:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:19:59', '2014-11-17 13:19:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:19:59', '2014-11-17 13:19:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:19:59', '2014-11-17 13:19:59', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:19:59.501599"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:19:59.523613"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:19:59.523613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:19:59.526665"], ["name", "test"], ["updated_at", "2014-11-17 13:19:59.526665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:19:59.643635"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:19:59.669787"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:19:59.669495"], ["updated_at", "2014-11-17 13:19:59.669787"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:20:00', '2014-11-17 13:20:00', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.6ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 41ms (Views: 2.4ms | ActiveRecord: 0.6ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'eaefcdaf3d229a6e1824299e107ffdea' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:20:00.173058"], ["extension", "txt"], ["name", "footest barish"], ["token", "eaefcdaf3d229a6e1824299e107ffdea"], ["updated_at", "2014-11-17 13:20:00.173058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:00.180356"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:20:00.180356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:20:00.228254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:20:00.244876"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:20:00.254500"], ["name", "test"], ["updated_at", "2014-11-17 13:20:00.254500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:20:00.262953"], ["name", "test"], ["updated_at", "2014-11-17 13:20:00.262953"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:00.266814"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:20:00.266814"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:00.269175"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:20:00.269175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:20:00.281615"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:20:00.389976"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:00.407456"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:20:00.407190"], ["updated_at", "2014-11-17 13:20:00.407456"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 29ms (Views: 1.7ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:20:00', '2014-11-17 13:20:00', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:00', '2014-11-17 13:20:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:20:00', '2014-11-17 13:20:00', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ea95ec6317e1394f4714a00385fb0006' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:20:00.605590"], ["extension", "png"], ["name", "Dummy"], ["token", "ea95ec6317e1394f4714a00385fb0006"], ["updated_at", "2014-11-17 13:20:00.605590"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 7ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:20:00.740387"]]  (0.6ms) commit transaction  (0.2ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:00.760278"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:20:00.000000000 Z\n updated_at: 2014-11-17 13:20:00.740387000 Z\n"], ["run_at", "2014-11-17 13:20:10.743659"], ["updated_at", "2014-11-17 13:20:00.760278"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:20:00.998022"], ["width", 800]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:20:01.488001"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:01.511532"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:20:00.000000000 Z\n updated_at: 2014-11-17 13:20:01.488001000 Z\n"], ["run_at", "2014-11-17 13:20:11.495395"], ["updated_at", "2014-11-17 13:20:01.511532"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:20:01', '2014-11-17 13:20:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 579229346) Fixture Insert (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:01', '2014-11-17 13:20:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:01', '2014-11-17 13:20:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:01', '2014-11-17 13:20:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:01', '2014-11-17 13:20:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:20:01', '2014-11-17 13:20:01', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cf43d42a6d2920ee08492313262470ea' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:20:01.697127"], ["extension", "txt"], ["name", "Test"], ["token", "cf43d42a6d2920ee08492313262470ea"], ["updated_at", "2014-11-17 13:20:01.697127"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8912b7a2c766b6482f41aa6f01291023' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:20:01.702153"], ["extension", "txt"], ["name", "Test"], ["token", "8912b7a2c766b6482f41aa6f01291023"], ["updated_at", "2014-11-17 13:20:01.702153"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b2bf8f19f38cea587159096e8864c13e' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:20:01.709368"], ["extension", "txt"], ["name", "Test"], ["token", "b2bf8f19f38cea587159096e8864c13e"], ["updated_at", "2014-11-17 13:20:01.709368"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2931b97d9bc68fbedae7616cbb0cc19d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:20:01.713765"], ["extension", "txt"], ["name", "Test"], ["token", "2931b97d9bc68fbedae7616cbb0cc19d"], ["updated_at", "2014-11-17 13:20:01.713765"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dd638a54ee4f6234c129fd0a00957fd0' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:20:01.718239"], ["extension", "txt"], ["name", "Test"], ["token", "dd638a54ee4f6234c129fd0a00957fd0"], ["updated_at", "2014-11-17 13:20:01.718239"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:20:01.734634"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:20:01.832514"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:20:01.854467"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:20:01.853868"], ["updated_at", "2014-11-17 13:20:01.854467"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:20:02', '2014-11-17 13:20:02', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:02', '2014-11-17 13:20:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:02', '2014-11-17 13:20:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:02', '2014-11-17 13:20:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:20:02', '2014-11-17 13:20:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:20:02', '2014-11-17 13:20:02', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:25:20', '2014-11-17 13:25:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:25:20.091444"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:25:20.104620"], ["name", "test"], ["updated_at", "2014-11-17 13:25:20.104620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:25:20.112679"], ["name", "test"], ["updated_at", "2014-11-17 13:25:20.112679"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:20.113941"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:25:20.113941"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:20.115217"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:25:20.115217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4dafa3051112da3017eaf48f829c0405' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:25:20.127836"], ["extension", "txt"], ["name", "Test"], ["token", "4dafa3051112da3017eaf48f829c0405"], ["updated_at", "2014-11-17 13:25:20.127836"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '65d341232dc0e2082b567ae5d908a64b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:25:20.132174"], ["extension", "txt"], ["name", "Test"], ["token", "65d341232dc0e2082b567ae5d908a64b"], ["updated_at", "2014-11-17 13:25:20.132174"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5c78fdea30842ac376046660d2afaecd' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:25:20.140087"], ["extension", "txt"], ["name", "Test"], ["token", "5c78fdea30842ac376046660d2afaecd"], ["updated_at", "2014-11-17 13:25:20.140087"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '685c7bae4dd1819ee6b874d06fb480cd' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:25:20.145168"], ["extension", "txt"], ["name", "Test"], ["token", "685c7bae4dd1819ee6b874d06fb480cd"], ["updated_at", "2014-11-17 13:25:20.145168"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6a71fb7f8e0a721162ddf975ffb29152' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:25:20.150749"], ["extension", "txt"], ["name", "Test"], ["token", "6a71fb7f8e0a721162ddf975ffb29152"], ["updated_at", "2014-11-17 13:25:20.150749"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:25:20.161945"], ["width", 800]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:25:20.302434"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (2.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:20.349261"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:25:20.348435"], ["updated_at", "2014-11-17 13:25:20.349261"]]  (0.9ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:25:20', '2014-11-17 13:25:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:20', '2014-11-17 13:25:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:25:20', '2014-11-17 13:25:20', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:25:20.597061"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:20.605465"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:25:20.605465"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:25:20.609412"], ["name", "test"], ["updated_at", "2014-11-17 13:25:20.609412"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cb803c164abc7ac17e704a1c5519af5f' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:25:20.625061"], ["extension", "png"], ["name", "Dummy"], ["token", "cb803c164abc7ac17e704a1c5519af5f"], ["updated_at", "2014-11-17 13:25:20.625061"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 3.3ms | ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:25:20.826611"]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:20.845772"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:25:20.845427"], ["updated_at", "2014-11-17 13:25:20.845772"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:25:21', '2014-11-17 13:25:21', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:21', '2014-11-17 13:25:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:21', '2014-11-17 13:25:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:21', '2014-11-17 13:25:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:21', '2014-11-17 13:25:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:25:21', '2014-11-17 13:25:21', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:25:21.264702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 22ms (Views: 1.0ms | ActiveRecord: 1.0ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.4ms) rollback transaction  (0.3ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '688a062f3ef0dfa940b9da711d6dfcd8' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:25:21.328520"], ["extension", "txt"], ["name", "footest barish"], ["token", "688a062f3ef0dfa940b9da711d6dfcd8"], ["updated_at", "2014-11-17 13:25:21.328520"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:21.335922"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:25:21.335922"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 0.8ms)  (1.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 0.8ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:25:21.487360"]]  (0.6ms) commit transaction  (0.2ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:21.510451"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:25:21.000000000 Z\n updated_at: 2014-11-17 13:25:21.487360000 Z\n"], ["run_at", "2014-11-17 13:25:31.490532"], ["updated_at", "2014-11-17 13:25:21.510451"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:25:21.779631"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:25:22.237820"]]  (4.8ms) commit transaction  (0.2ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:22.268708"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:25:21.000000000 Z\n updated_at: 2014-11-17 13:25:22.237820000 Z\n"], ["run_at", "2014-11-17 13:25:32.245561"], ["updated_at", "2014-11-17 13:25:22.268708"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:25:22', '2014-11-17 13:25:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:25:22.481568"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:25:22.596870"]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:25:22.618227"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:25:22.617935"], ["updated_at", "2014-11-17 13:25:22.618227"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 32ms (Views: 2.1ms | ActiveRecord: 3.9ms)  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:25:22', '2014-11-17 13:25:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:25:22', '2014-11-17 13:25:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:25:22', '2014-11-17 13:25:22', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:27:01', '2014-11-17 13:27:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b3980d54fefe84fee656b706ac167885' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:27:01.677443"], ["extension", "txt"], ["name", "Test"], ["token", "b3980d54fefe84fee656b706ac167885"], ["updated_at", "2014-11-17 13:27:01.677443"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8bb89ff6388dfc98212262f7d8062340' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:27:01.680688"], ["extension", "txt"], ["name", "Test"], ["token", "8bb89ff6388dfc98212262f7d8062340"], ["updated_at", "2014-11-17 13:27:01.680688"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b28ddc7faa479b2ddaf8f75528d3853c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:27:01.686202"], ["extension", "txt"], ["name", "Test"], ["token", "b28ddc7faa479b2ddaf8f75528d3853c"], ["updated_at", "2014-11-17 13:27:01.686202"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '05403c776bdf3a10fecb62f795004ca7' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:27:01.688857"], ["extension", "txt"], ["name", "Test"], ["token", "05403c776bdf3a10fecb62f795004ca7"], ["updated_at", "2014-11-17 13:27:01.688857"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a279be1f5adc20cacc42b9b414e68f52' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:27:01.692872"], ["extension", "txt"], ["name", "Test"], ["token", "a279be1f5adc20cacc42b9b414e68f52"], ["updated_at", "2014-11-17 13:27:01.692872"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:27:01.705780"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:27:01.802858"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:01.821201"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:27:01.820864"], ["updated_at", "2014-11-17 13:27:01.821201"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:27:01', '2014-11-17 13:27:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:01', '2014-11-17 13:27:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:27:01', '2014-11-17 13:27:01', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:27:02.004179"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:27:02.009438"], ["name", "test"], ["updated_at", "2014-11-17 13:27:02.009438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:27:02.015943"], ["name", "test"], ["updated_at", "2014-11-17 13:27:02.015943"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:02.017084"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:27:02.017084"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:02.018037"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:27:02.018037"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:27:02.122893"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:02.143516"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:27:02.143245"], ["updated_at", "2014-11-17 13:27:02.143516"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:27:02', '2014-11-17 13:27:02', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:02', '2014-11-17 13:27:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:02', '2014-11-17 13:27:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:02', '2014-11-17 13:27:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:02', '2014-11-17 13:27:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:27:02', '2014-11-17 13:27:02', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:27:02.633673"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:02.658104"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:27:02.000000000 Z\n updated_at: 2014-11-17 13:27:02.633673000 Z\n"], ["run_at", "2014-11-17 13:27:12.637994"], ["updated_at", "2014-11-17 13:27:02.658104"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:27:02.883348"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:27:03.324577"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:03.348530"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:27:02.000000000 Z\n updated_at: 2014-11-17 13:27:03.324577000 Z\n"], ["run_at", "2014-11-17 13:27:13.332601"], ["updated_at", "2014-11-17 13:27:03.348530"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:27:03', '2014-11-17 13:27:03', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:27:03.527446"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:03.532656"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:27:03.532656"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:27:03.535072"], ["name", "test"], ["updated_at", "2014-11-17 13:27:03.535072"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:27:03.540648"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:27:03.638216"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:03.655012"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:27:03.654737"], ["updated_at", "2014-11-17 13:27:03.655012"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 28ms (Views: 1.6ms | ActiveRecord: 3.1ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:27:03', '2014-11-17 13:27:03', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:27:03', '2014-11-17 13:27:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:27:03', '2014-11-17 13:27:03', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:27:03.824916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '56081d5907414adc4f3e9bf1dfc86038' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:27:03.854457"], ["extension", "txt"], ["name", "footest barish"], ["token", "56081d5907414adc4f3e9bf1dfc86038"], ["updated_at", "2014-11-17 13:27:03.854457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:27:03.856786"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:27:03.856786"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9f03337de8f86ed2ad54c226a6c9184c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:27:03.876951"], ["extension", "png"], ["name", "Dummy"], ["token", "9f03337de8f86ed2ad54c226a6c9184c"], ["updated_at", "2014-11-17 13:27:03.876951"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (1.6ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (1.0ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.8ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.6ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.8ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.6ms) DROP TABLE "images"  (0.2ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (1.1ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.2ms) begin transaction  (0.6ms) DROP TABLE "movies"  (0.1ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.9ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "movie_fogged_resources"  (0.2ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:29', '2014-11-17 13:35:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:29', '2014-11-17 13:35:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:29', '2014-11-17 13:35:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:29', '2014-11-17 13:35:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:29', '2014-11-17 13:35:29', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:29', '2014-11-17 13:35:29', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4f566b03497e138b89c029da71a10b86' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:29.719518"], ["extension", "txt"], ["name", "Test"], ["token", "4f566b03497e138b89c029da71a10b86"], ["updated_at", "2014-11-17 13:35:29.719518"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd9e44744608df94985713c5f7b3ae7be' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:29.726371"], ["extension", "txt"], ["name", "Test"], ["token", "d9e44744608df94985713c5f7b3ae7be"], ["updated_at", "2014-11-17 13:35:29.726371"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2a222444504626d1579056b5f3665dc5' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:29.733925"], ["extension", "txt"], ["name", "Test"], ["token", "2a222444504626d1579056b5f3665dc5"], ["updated_at", "2014-11-17 13:35:29.733925"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e91935db7549a2ab511ae916240ae481' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:29.737549"], ["extension", "txt"], ["name", "Test"], ["token", "e91935db7549a2ab511ae916240ae481"], ["updated_at", "2014-11-17 13:35:29.737549"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '92945423b6adf39ed9ef47021941f334' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:29.744842"], ["extension", "txt"], ["name", "Test"], ["token", "92945423b6adf39ed9ef47021941f334"], ["updated_at", "2014-11-17 13:35:29.744842"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:35:29.815812"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:35:29.925993"]]  (0.6ms) commit transaction  (0.4ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:29.950113"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:35:29.949735"], ["updated_at", "2014-11-17 13:35:29.950113"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:30', '2014-11-17 13:35:30', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:35:30.147006"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:35:30.162444"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:35:30.264457"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:30.287759"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:35:30.287408"], ["updated_at", "2014-11-17 13:35:30.287759"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 36ms (Views: 2.8ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:30', '2014-11-17 13:35:30', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:30', '2014-11-17 13:35:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:30', '2014-11-17 13:35:30', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:35:30.513315"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:35:30.521180"], ["name", "test"], ["updated_at", "2014-11-17 13:35:30.521180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:35:30.527333"], ["name", "test"], ["updated_at", "2014-11-17 13:35:30.527333"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:30.529024"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:35:30.529024"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:30.530983"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:35:30.530983"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:35:30.622880"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:30.646386"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:35:30.000000000 Z\n updated_at: 2014-11-17 13:35:30.622880000 Z\n"], ["run_at", "2014-11-17 13:35:40.626517"], ["updated_at", "2014-11-17 13:35:30.646386"]]  (1.2ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:35:30.884249"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:35:31.365607"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:31.395981"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:35:30.000000000 Z\n updated_at: 2014-11-17 13:35:31.365607000 Z\n"], ["run_at", "2014-11-17 13:35:41.374729"], ["updated_at", "2014-11-17 13:35:31.395981"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:31', '2014-11-17 13:35:31', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:31', '2014-11-17 13:35:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:31', '2014-11-17 13:35:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:31', '2014-11-17 13:35:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:31', '2014-11-17 13:35:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:31', '2014-11-17 13:35:31', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:35:31.594036"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:31.601048"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:35:31.601048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:35:31.604692"], ["name", "test"], ["updated_at", "2014-11-17 13:35:31.604692"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 14ms (Views: 1.0ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '110c24f89afd0e2ca4cdf1a9537bf7eb' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:31.665709"], ["extension", "txt"], ["name", "footest barish"], ["token", "110c24f89afd0e2ca4cdf1a9537bf7eb"], ["updated_at", "2014-11-17 13:35:31.665709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:31.668782"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:35:31.668782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6214322a99e8cbe260376a87a44e643b' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:35:31.702331"], ["extension", "png"], ["name", "Dummy"], ["token", "6214322a99e8cbe260376a87a44e643b"], ["updated_at", "2014-11-17 13:35:31.702331"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:35:31.825624"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:31.845431"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:35:31.845055"], ["updated_at", "2014-11-17 13:35:31.845431"]]  (0.7ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (1.4ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.7ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.8ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.9ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "images"  (0.1ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (1.0ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "movies"  (0.2ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.9ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.2ms) begin transaction  (0.3ms) DROP TABLE "movie_fogged_resources"  (0.2ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (1.2ms) commit transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:45', '2014-11-17 13:35:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:45', '2014-11-17 13:35:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:45', '2014-11-17 13:35:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:45', '2014-11-17 13:35:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:45', '2014-11-17 13:35:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:45', '2014-11-17 13:35:45', 948421225)  (1.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:35:45.707118"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:45.742982"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:35:45.000000000 Z\n updated_at: 2014-11-17 13:35:45.707118000 Z\n"], ["run_at", "2014-11-17 13:35:55.713621"], ["updated_at", "2014-11-17 13:35:45.742982"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:35:46.050660"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:35:46.621341"]]  (0.7ms) commit transaction  (0.3ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:46.659729"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:35:45.000000000 Z\n updated_at: 2014-11-17 13:35:46.621341000 Z\n"], ["run_at", "2014-11-17 13:35:56.627289"], ["updated_at", "2014-11-17 13:35:46.659729"]]  (2.5ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:46', '2014-11-17 13:35:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:46', '2014-11-17 13:35:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:46', '2014-11-17 13:35:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:46', '2014-11-17 13:35:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:46', '2014-11-17 13:35:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:46', '2014-11-17 13:35:46', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd6c85725224e256a0938d6289bf3d01b' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:46.885164"], ["extension", "txt"], ["name", "Test"], ["token", "d6c85725224e256a0938d6289bf3d01b"], ["updated_at", "2014-11-17 13:35:46.885164"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '29773aae162488c09cff01e34653731f' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:46.891282"], ["extension", "txt"], ["name", "Test"], ["token", "29773aae162488c09cff01e34653731f"], ["updated_at", "2014-11-17 13:35:46.891282"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '920f0c43ef6f239d6fca544491774bd9' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:46.902032"], ["extension", "txt"], ["name", "Test"], ["token", "920f0c43ef6f239d6fca544491774bd9"], ["updated_at", "2014-11-17 13:35:46.902032"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3a35185084c004dbffbcfb9c7ac14e2c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:46.907122"], ["extension", "txt"], ["name", "Test"], ["token", "3a35185084c004dbffbcfb9c7ac14e2c"], ["updated_at", "2014-11-17 13:35:46.907122"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2445bca83c4dbc9a8dce8afe8eaeb547' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:46.917274"], ["extension", "txt"], ["name", "Test"], ["token", "2445bca83c4dbc9a8dce8afe8eaeb547"], ["updated_at", "2014-11-17 13:35:46.917274"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:35:46.933719"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:35:47.044563"]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:47.068463"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:35:47.067567"], ["updated_at", "2014-11-17 13:35:47.068463"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:47', '2014-11-17 13:35:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:35:47.240592"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:47.255625"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:35:47.255625"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:35:47.258676"], ["name", "test"], ["updated_at", "2014-11-17 13:35:47.258676"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:35:47.358042"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:47.380678"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:35:47.380349"], ["updated_at", "2014-11-17 13:35:47.380678"]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:47', '2014-11-17 13:35:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:47', '2014-11-17 13:35:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:47', '2014-11-17 13:35:47', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:35:47.804300"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.0ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:35:47.819271"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:35:47.939353"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:47.959206"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:35:47.958770"], ["updated_at", "2014-11-17 13:35:47.959206"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 32ms (Views: 1.8ms | ActiveRecord: 3.2ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:35:48', '2014-11-17 13:35:48', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:48', '2014-11-17 13:35:48', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:48', '2014-11-17 13:35:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:48', '2014-11-17 13:35:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:35:48', '2014-11-17 13:35:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:35:48', '2014-11-17 13:35:48', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f7d21159f88d916e4d139d9d5d9c7a63' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:35:48.134812"], ["extension", "png"], ["name", "Dummy"], ["token", "f7d21159f88d916e4d139d9d5d9c7a63"], ["updated_at", "2014-11-17 13:35:48.134812"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 31ms (Views: 1.6ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b902247224dfefc63584b0b13db1674b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:35:48.236968"], ["extension", "txt"], ["name", "footest barish"], ["token", "b902247224dfefc63584b0b13db1674b"], ["updated_at", "2014-11-17 13:35:48.236968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:48.245215"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:35:48.245215"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (1.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.8ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:35:48.289735"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:35:48.294510"], ["name", "test"], ["updated_at", "2014-11-17 13:35:48.294510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:35:48.299202"], ["name", "test"], ["updated_at", "2014-11-17 13:35:48.299202"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:48.300141"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:35:48.300141"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:35:48.301294"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:35:48.301294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:51:31', '2014-11-17 13:51:31', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:31', '2014-11-17 13:51:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:31', '2014-11-17 13:51:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:31', '2014-11-17 13:51:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:31', '2014-11-17 13:51:31', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:51:31', '2014-11-17 13:51:31', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:51:31.304989"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:31.323792"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-11-17 13:51:31.000000000 Z\n updated_at: 2014-11-17 13:51:31.304989000 Z\n"], ["run_at", "2014-11-17 13:51:41.309396"], ["updated_at", "2014-11-17 13:51:31.323792"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-11-17 13:51:31.617556"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-11-17 13:51:32.217489"]]  (5.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:32.246652"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-11-17 13:51:31.000000000 Z\n updated_at: 2014-11-17 13:51:32.217489000 Z\n"], ["run_at", "2014-11-17 13:51:42.229704"], ["updated_at", "2014-11-17 13:51:32.246652"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:51:32', '2014-11-17 13:51:32', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:32', '2014-11-17 13:51:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:32', '2014-11-17 13:51:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:32', '2014-11-17 13:51:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:32', '2014-11-17 13:51:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:51:32', '2014-11-17 13:51:32', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-11-17 13:51:32.545968"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:51:32.568028"], ["name", "test"], ["updated_at", "2014-11-17 13:51:32.568028"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:51:32.576930"], ["name", "test"], ["updated_at", "2014-11-17 13:51:32.576930"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:32.579663"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:51:32.579663"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:32.582888"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-11-17 13:51:32.582888"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:51:32.707388"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:32.733649"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:51:32.733020"], ["updated_at", "2014-11-17 13:51:32.733649"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:51:33', '2014-11-17 13:51:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 948421225)  (5.1ms) commit transaction  (0.2ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 22ms (Views: 3.0ms | ActiveRecord: 0.8ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 13ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c3a118b72c4b3b3e1c59420f4243677a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:51:33.182548"], ["extension", "txt"], ["name", "footest barish"], ["token", "c3a118b72c4b3b3e1c59420f4243677a"], ["updated_at", "2014-11-17 13:51:33.182548"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.9ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:33.185303"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-11-17 13:51:33.185303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 1.0ms | ActiveRecord: 1.1ms)  (1.8ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.7ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 11ms (Views: 2.3ms | ActiveRecord: 1.0ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-11-17 13:51:33.243255"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:33.248852"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-11-17 13:51:33.248852"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-11-17 13:51:33.251115"], ["name", "test"], ["updated_at", "2014-11-17 13:51:33.251115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd4dc7e86bde33a0356bda28dae82bbc2' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:51:33.284654"], ["extension", "txt"], ["name", "Test"], ["token", "d4dc7e86bde33a0356bda28dae82bbc2"], ["updated_at", "2014-11-17 13:51:33.284654"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '095b0b7707e043d0f9106a6df11158dc' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:51:33.290125"], ["extension", "txt"], ["name", "Test"], ["token", "095b0b7707e043d0f9106a6df11158dc"], ["updated_at", "2014-11-17 13:51:33.290125"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9924c8c1775d46df1741b818f2e66446' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:51:33.295707"], ["extension", "txt"], ["name", "Test"], ["token", "9924c8c1775d46df1741b818f2e66446"], ["updated_at", "2014-11-17 13:51:33.295707"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6840d814706732c224b7091f54bb0478' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:51:33.303180"], ["extension", "txt"], ["name", "Test"], ["token", "6840d814706732c224b7091f54bb0478"], ["updated_at", "2014-11-17 13:51:33.303180"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8cb30024cfcfad3af71345f31c5cdcf6' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-11-17 13:51:33.308523"], ["extension", "txt"], ["name", "Test"], ["token", "8cb30024cfcfad3af71345f31c5cdcf6"], ["updated_at", "2014-11-17 13:51:33.308523"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:51:33.322669"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:51:33.459148"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:33.476959"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:51:33.476520"], ["updated_at", "2014-11-17 13:51:33.476959"]]  (1.3ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:51:33', '2014-11-17 13:51:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-11-17 13:51:33.639485"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-11-17 13:51:33.769131"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-11-17 13:51:33.785268"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-11-17 13:51:33.784982"], ["updated_at", "2014-11-17 13:51:33.785268"]]  (1.4ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 32ms (Views: 2.9ms | ActiveRecord: 4.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-11-17 13:51:33', '2014-11-17 13:51:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-11-17 13:51:33', '2014-11-17 13:51:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-11-17 13:51:33', '2014-11-17 13:51:33', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-11-17 13:51:33.987596"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '03da2b436d6af1574e2838e8e571f33c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-11-17 13:51:34.022722"], ["extension", "png"], ["name", "Dummy"], ["token", "03da2b436d6af1574e2838e8e571f33c"], ["updated_at", "2014-11-17 13:51:34.022722"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.6ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:17:21', '2014-12-19 16:17:21', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:21', '2014-12-19 16:17:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:21', '2014-12-19 16:17:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:21', '2014-12-19 16:17:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:21', '2014-12-19 16:17:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:17:21', '2014-12-19 16:17:21', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:17:22.081471"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:17:22.106224"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-19 16:17:21.000000000 Z\n updated_at: 2014-12-19 16:17:22.081471000 Z\n"], ["run_at", "2014-12-19 16:17:32.087918"], ["updated_at", "2014-12-19 16:17:22.106224"]]  (2.1ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-19 16:17:22.348922"], ["width", 800]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:17:22.813006"]]  (4.8ms) commit transaction  (0.2ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:17:22.847948"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-19 16:17:21.000000000 Z\n updated_at: 2014-12-19 16:17:22.813006000 Z\n"], ["run_at", "2014-12-19 16:17:32.822701"], ["updated_at", "2014-12-19 16:17:22.847948"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:17:23', '2014-12-19 16:17:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 500 Internal Server Error in 164ms  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 8ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c0925651f74ba111a7f4fddf16e4dc19' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:17:23.206170"], ["extension", "txt"], ["name", "footest barish"], ["token", "c0925651f74ba111a7f4fddf16e4dc19"], ["updated_at", "2014-12-19 16:17:23.206170"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (2.8ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:17:23.215900"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-19 16:17:23.215900"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 500 Internal Server Error in 5ms  (3.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 4ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-19 16:17:23.257868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 6ms  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:17:23', '2014-12-19 16:17:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:17:23', '2014-12-19 16:17:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:23', '2014-12-19 16:17:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 500 Internal Server Error in 4ms  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:17:24', '2014-12-19 16:17:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:24', '2014-12-19 16:17:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:24', '2014-12-19 16:17:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:24', '2014-12-19 16:17:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:24', '2014-12-19 16:17:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:17:24', '2014-12-19 16:17:24', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 4ms  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-19 16:17:24.539762"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:17:24.555429"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:17:24.555429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:17:24.558494"], ["name", "test"], ["updated_at", "2014-12-19 16:17:24.558494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b74718205d6fc336998588d18bab074f' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:17:24.564689"], ["extension", "txt"], ["name", "Test"], ["token", "b74718205d6fc336998588d18bab074f"], ["updated_at", "2014-12-19 16:17:24.564689"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '01aca867be04a033868458bc74a05dc9' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:17:24.569340"], ["extension", "txt"], ["name", "Test"], ["token", "01aca867be04a033868458bc74a05dc9"], ["updated_at", "2014-12-19 16:17:24.569340"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1356d70f225f6ab08c3ddd48c67aa5e6' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:17:24.575311"], ["extension", "txt"], ["name", "Test"], ["token", "1356d70f225f6ab08c3ddd48c67aa5e6"], ["updated_at", "2014-12-19 16:17:24.575311"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9380ca5ec3530f64a07e6397cc541e44' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:17:24.580156"], ["extension", "txt"], ["name", "Test"], ["token", "9380ca5ec3530f64a07e6397cc541e44"], ["updated_at", "2014-12-19 16:17:24.580156"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '57fb98c6bc2e401191d8d33650d9a13b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:17:24.584877"], ["extension", "txt"], ["name", "Test"], ["token", "57fb98c6bc2e401191d8d33650d9a13b"], ["updated_at", "2014-12-19 16:17:24.584877"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:17:25', '2014-12-19 16:17:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:25', '2014-12-19 16:17:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:25', '2014-12-19 16:17:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:25', '2014-12-19 16:17:25', 98413728, 245026679, 784085492) Fixture Insert (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:17:25', '2014-12-19 16:17:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:17:25', '2014-12-19 16:17:25', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9585008522ee9e5d06f31c5f80aa07c6' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:17:25.112365"], ["extension", "png"], ["name", "Dummy"], ["token", "9585008522ee9e5d06f31c5f80aa07c6"], ["updated_at", "2014-12-19 16:17:25.112365"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 6ms  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-19 16:17:25.162383"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:17:25.169352"], ["name", "test"], ["updated_at", "2014-12-19 16:17:25.169352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (3.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:17:25.180718"], ["name", "test"], ["updated_at", "2014-12-19 16:17:25.180718"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:17:25.182544"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:17:25.182544"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:17:25.184148"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-19 16:17:25.184148"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:18:41', '2014-12-19 16:18:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:18:41', '2014-12-19 16:18:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:18:41', '2014-12-19 16:18:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:18:41', '2014-12-19 16:18:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:18:41', '2014-12-19 16:18:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:18:41', '2014-12-19 16:18:41', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '523f43e918e5b23b0ecdf17a0d4b9bf5' LIMIT 1 SQL (1.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:18:41.370283"], ["extension", "png"], ["name", "Dummy"], ["token", "523f43e918e5b23b0ecdf17a0d4b9bf5"], ["updated_at", "2014-12-19 16:18:41.370283"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 5882ms  (5.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:19:09', '2014-12-19 16:19:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:09', '2014-12-19 16:19:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:09', '2014-12-19 16:19:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:09', '2014-12-19 16:19:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:09', '2014-12-19 16:19:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:19:09', '2014-12-19 16:19:09', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd220067948a8975a5cae42eb3d16fe6f' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:19:09.899441"], ["extension", "png"], ["name", "Dummy"], ["token", "d220067948a8975a5cae42eb3d16fe6f"], ["updated_at", "2014-12-19 16:19:09.899441"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 7078ms  (5.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:19:36', '2014-12-19 16:19:36', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:36', '2014-12-19 16:19:36', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:36', '2014-12-19 16:19:36', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:36', '2014-12-19 16:19:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:19:36', '2014-12-19 16:19:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:19:36', '2014-12-19 16:19:36', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bc3cbbe367220416495aef6b3ddd8a57' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:19:36.488950"], ["extension", "png"], ["name", "Dummy"], ["token", "bc3cbbe367220416495aef6b3ddd8a57"], ["updated_at", "2014-12-19 16:19:36.488950"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3850ms  (4.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:21:26', '2014-12-19 16:21:26', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 153115190) Fixture Delete (0.7ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:21:26', '2014-12-19 16:21:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:21:26', '2014-12-19 16:21:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:21:26', '2014-12-19 16:21:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:21:26', '2014-12-19 16:21:26', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:21:26', '2014-12-19 16:21:26', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b649ab13a6e1926d3f276e429dbb249f' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:21:26.643137"], ["extension", "png"], ["name", "Dummy"], ["token", "b649ab13a6e1926d3f276e429dbb249f"], ["updated_at", "2014-12-19 16:21:26.643137"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 13347ms  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:22:07', '2014-12-19 16:22:07', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:07', '2014-12-19 16:22:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:07', '2014-12-19 16:22:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:07', '2014-12-19 16:22:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:07', '2014-12-19 16:22:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:22:07', '2014-12-19 16:22:07', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd1e96b45605221ae5239dfc90db1f379' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:22:07.907658"], ["extension", "png"], ["name", "Dummy"], ["token", "d1e96b45605221ae5239dfc90db1f379"], ["updated_at", "2014-12-19 16:22:07.907658"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 8695ms  (4.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 9ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:22:26', '2014-12-19 16:22:26', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:26', '2014-12-19 16:22:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:26', '2014-12-19 16:22:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:26', '2014-12-19 16:22:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:22:26', '2014-12-19 16:22:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:22:26', '2014-12-19 16:22:26', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c3ce7621b7e0d52f7172a4f15cb142ed' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:22:26.894040"], ["extension", "png"], ["name", "Dummy"], ["token", "c3ce7621b7e0d52f7172a4f15cb142ed"], ["updated_at", "2014-12-19 16:22:26.894040"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2241ms  (4.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:39:23', '2014-12-19 16:39:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 153115190) Fixture Delete (0.5ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:23', '2014-12-19 16:39:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:23', '2014-12-19 16:39:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:23', '2014-12-19 16:39:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:23', '2014-12-19 16:39:23', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:39:23', '2014-12-19 16:39:23', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (1.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '494e2a1c0c47027dcd1c70afb387f4ca' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:39:24.019627"], ["extension", "png"], ["name", "Dummy"], ["token", "494e2a1c0c47027dcd1c70afb387f4ca"], ["updated_at", "2014-12-19 16:39:24.019627"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 137ms (Views: 103.3ms | ActiveRecord: 1.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:39:31', '2014-12-19 16:39:31', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:31', '2014-12-19 16:39:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:31', '2014-12-19 16:39:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:31', '2014-12-19 16:39:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:31', '2014-12-19 16:39:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:39:31', '2014-12-19 16:39:31', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-19 16:39:31.729320"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:39:31.747297"], ["name", "test"], ["updated_at", "2014-12-19 16:39:31.747297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:39:31.758558"], ["name", "test"], ["updated_at", "2014-12-19 16:39:31.758558"]] SQL (0.9ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:31.760704"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:39:31.760704"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:31.764348"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-19 16:39:31.764348"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-19 16:39:31.787177"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 99ms (Views: 43.1ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:39:31.992895"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:32.015005"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-19 16:39:31.000000000 Z\n updated_at: 2014-12-19 16:39:31.992895000 Z\n"], ["run_at", "2014-12-19 16:39:41.996701"], ["updated_at", "2014-12-19 16:39:32.015005"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-19 16:39:32.248695"], ["width", 800]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:39:32.785200"]]  (5.0ms) commit transaction  (0.3ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:32.812065"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-19 16:39:31.000000000 Z\n updated_at: 2014-12-19 16:39:32.785200000 Z\n"], ["run_at", "2014-12-19 16:39:42.793538"], ["updated_at", "2014-12-19 16:39:32.812065"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:39:32', '2014-12-19 16:39:32', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:32', '2014-12-19 16:39:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:32', '2014-12-19 16:39:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:32', '2014-12-19 16:39:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:32', '2014-12-19 16:39:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:39:32', '2014-12-19 16:39:32', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:39:32.974868"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:39:33.088698"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:33.108080"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:39:33.107762"], ["updated_at", "2014-12-19 16:39:33.108080"]]  (0.6ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 37ms (Views: 2.1ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:39:33', '2014-12-19 16:39:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 21ms (Views: 2.2ms | ActiveRecord: 0.7ms) Movie Load (0.3ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.7ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '82edf2a6d8f605a8df323a1335f86737' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:39:33.311818"], ["extension", "txt"], ["name", "footest barish"], ["token", "82edf2a6d8f605a8df323a1335f86737"], ["updated_at", "2014-12-19 16:39:33.311818"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:33.314796"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-19 16:39:33.314796"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 1.3ms | ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd29eaab05babc2383a647c47dc086f9a' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:39:33.357003"], ["extension", "png"], ["name", "Dummy"], ["token", "d29eaab05babc2383a647c47dc086f9a"], ["updated_at", "2014-12-19 16:39:33.357003"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:39:33.464889"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:33.482616"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:39:33.482323"], ["updated_at", "2014-12-19 16:39:33.482616"]]  (1.4ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:39:33', '2014-12-19 16:39:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:39:33', '2014-12-19 16:39:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:39:33', '2014-12-19 16:39:33', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-19 16:39:33.893431"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:33.903256"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:39:33.903256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:39:33.908761"], ["name", "test"], ["updated_at", "2014-12-19 16:39:33.908761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5ac5863cfa3136cf24ef344314b9aff5' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:39:33.957873"], ["extension", "txt"], ["name", "Test"], ["token", "5ac5863cfa3136cf24ef344314b9aff5"], ["updated_at", "2014-12-19 16:39:33.957873"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '560137bf73920a43ecbe569f6a190e41' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:39:33.961288"], ["extension", "txt"], ["name", "Test"], ["token", "560137bf73920a43ecbe569f6a190e41"], ["updated_at", "2014-12-19 16:39:33.961288"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dfa6feec84c4d93f971fc64a6e57ddde' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:39:33.972144"], ["extension", "txt"], ["name", "Test"], ["token", "dfa6feec84c4d93f971fc64a6e57ddde"], ["updated_at", "2014-12-19 16:39:33.972144"], ["uploading", "f"]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e5bbad39e5bb42d63d1ded4f7614648d' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:39:33.980530"], ["extension", "txt"], ["name", "Test"], ["token", "e5bbad39e5bb42d63d1ded4f7614648d"], ["updated_at", "2014-12-19 16:39:33.980530"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f573eb988a44c92ec38b7da0adcabb6d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:39:33.987709"], ["extension", "txt"], ["name", "Test"], ["token", "f573eb988a44c92ec38b7da0adcabb6d"], ["updated_at", "2014-12-19 16:39:33.987709"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:39:34.004825"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:39:34.109072"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:39:34.124322"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:39:34.124048"], ["updated_at", "2014-12-19 16:39:34.124322"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:42:02', '2014-12-19 16:42:02', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:02', '2014-12-19 16:42:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:02', '2014-12-19 16:42:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:02', '2014-12-19 16:42:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:02', '2014-12-19 16:42:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:42:02', '2014-12-19 16:42:02', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b917ad781cb05d6712351b3f047d81fd' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:02.597918"], ["extension", "txt"], ["name", "Test"], ["token", "b917ad781cb05d6712351b3f047d81fd"], ["updated_at", "2014-12-19 16:42:02.597918"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '770eda3b701177fe8354045e4b959cb7' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:02.605399"], ["extension", "txt"], ["name", "Test"], ["token", "770eda3b701177fe8354045e4b959cb7"], ["updated_at", "2014-12-19 16:42:02.605399"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '66e8144028f64c826bb0ea7bf723910b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:02.614135"], ["extension", "txt"], ["name", "Test"], ["token", "66e8144028f64c826bb0ea7bf723910b"], ["updated_at", "2014-12-19 16:42:02.614135"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5cf858d8f6952869b2bd7eeb12aa5b9a' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:02.617601"], ["extension", "txt"], ["name", "Test"], ["token", "5cf858d8f6952869b2bd7eeb12aa5b9a"], ["updated_at", "2014-12-19 16:42:02.617601"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5a6949556879c37f6369fd2ef7aee107' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:02.683965"], ["extension", "txt"], ["name", "Test"], ["token", "5a6949556879c37f6369fd2ef7aee107"], ["updated_at", "2014-12-19 16:42:02.683965"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:42:02.699983"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:42:02.806792"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:42:02.847915"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:42:02.847604"], ["updated_at", "2014-12-19 16:42:02.847915"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:42:29', '2014-12-19 16:42:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:29', '2014-12-19 16:42:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:29', '2014-12-19 16:42:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:29', '2014-12-19 16:42:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:42:29', '2014-12-19 16:42:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:42:29', '2014-12-19 16:42:29', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'af8b3be1d00a575facce887fb1e7eec4' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:29.711094"], ["extension", "txt"], ["name", "Test"], ["token", "af8b3be1d00a575facce887fb1e7eec4"], ["updated_at", "2014-12-19 16:42:29.711094"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8ff39e88392190cf85a593a4197b6516' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:29.719246"], ["extension", "txt"], ["name", "Test"], ["token", "8ff39e88392190cf85a593a4197b6516"], ["updated_at", "2014-12-19 16:42:29.719246"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '24c589044e67977bcdc70a8b0951cb93' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:29.727748"], ["extension", "txt"], ["name", "Test"], ["token", "24c589044e67977bcdc70a8b0951cb93"], ["updated_at", "2014-12-19 16:42:29.727748"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '96a9db925837ccc291ba2ef92864dfd0' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:29.734691"], ["extension", "txt"], ["name", "Test"], ["token", "96a9db925837ccc291ba2ef92864dfd0"], ["updated_at", "2014-12-19 16:42:29.734691"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bfc0af016e2db4fb69893cef05ae9d76' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:42:29.796548"], ["extension", "txt"], ["name", "Test"], ["token", "bfc0af016e2db4fb69893cef05ae9d76"], ["updated_at", "2014-12-19 16:42:29.796548"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:42:50.886416"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:42:50.983000"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:42:51.005673"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:42:51.005327"], ["updated_at", "2014-12-19 16:42:51.005673"]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:43:00', '2014-12-19 16:43:00', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:00', '2014-12-19 16:43:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:00', '2014-12-19 16:43:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:00', '2014-12-19 16:43:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:00', '2014-12-19 16:43:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:43:00', '2014-12-19 16:43:00', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9adca13fcdd2ef87b59a9a1c3132847b' LIMIT 1 SQL (1.0ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:43:00.213528"], ["extension", "txt"], ["name", "Test"], ["token", "9adca13fcdd2ef87b59a9a1c3132847b"], ["updated_at", "2014-12-19 16:43:00.213528"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:43:12', '2014-12-19 16:43:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:12', '2014-12-19 16:43:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:12', '2014-12-19 16:43:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:12', '2014-12-19 16:43:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:43:12', '2014-12-19 16:43:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:43:12', '2014-12-19 16:43:12', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9e573cc30f4aca2fc6e0907b75ef625d' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:43:12.696360"], ["extension", "txt"], ["name", "Test"], ["token", "9e573cc30f4aca2fc6e0907b75ef625d"], ["updated_at", "2014-12-19 16:43:12.696360"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:45:47', '2014-12-19 16:45:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:45:47', '2014-12-19 16:45:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:45:47', '2014-12-19 16:45:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:45:47', '2014-12-19 16:45:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:45:47', '2014-12-19 16:45:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:45:47', '2014-12-19 16:45:47', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '259fc730e34c4fe997dee43391338034' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:45:47.870052"], ["extension", "txt"], ["name", "Test"], ["token", "259fc730e34c4fe997dee43391338034"], ["updated_at", "2014-12-19 16:45:47.870052"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:46:11', '2014-12-19 16:46:11', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:11', '2014-12-19 16:46:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:11', '2014-12-19 16:46:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:11', '2014-12-19 16:46:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:11', '2014-12-19 16:46:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:46:11', '2014-12-19 16:46:11', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '275b0361b183b23b6d6380968d99cd6d' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:46:11.526425"], ["extension", "txt"], ["name", "Test"], ["token", "275b0361b183b23b6d6380968d99cd6d"], ["updated_at", "2014-12-19 16:46:11.526425"], ["uploading", "f"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:46:21', '2014-12-19 16:46:21', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:21', '2014-12-19 16:46:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:21', '2014-12-19 16:46:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:21', '2014-12-19 16:46:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:46:21', '2014-12-19 16:46:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:46:21', '2014-12-19 16:46:21', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ed22f9941041dd0adfb4768c7184e46e' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:46:21.339478"], ["extension", "txt"], ["name", "Test"], ["token", "ed22f9941041dd0adfb4768c7184e46e"], ["updated_at", "2014-12-19 16:46:21.339478"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:47:09', '2014-12-19 16:47:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:09', '2014-12-19 16:47:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:09', '2014-12-19 16:47:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:09', '2014-12-19 16:47:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:09', '2014-12-19 16:47:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:47:09', '2014-12-19 16:47:09', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '966927ca6716481775901348adbe1b8a' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:47:09.713219"], ["extension", "txt"], ["name", "Test"], ["token", "966927ca6716481775901348adbe1b8a"], ["updated_at", "2014-12-19 16:47:09.713219"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:47:55', '2014-12-19 16:47:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:55', '2014-12-19 16:47:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:55', '2014-12-19 16:47:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:55', '2014-12-19 16:47:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:47:55', '2014-12-19 16:47:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:47:55', '2014-12-19 16:47:55', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5226f1332380312b46d546eb577b870a' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:47:55.166189"], ["extension", "txt"], ["name", "Test"], ["token", "5226f1332380312b46d546eb577b870a"], ["updated_at", "2014-12-19 16:47:55.166189"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:48:22', '2014-12-19 16:48:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:22', '2014-12-19 16:48:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:22', '2014-12-19 16:48:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:22', '2014-12-19 16:48:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:22', '2014-12-19 16:48:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:48:22', '2014-12-19 16:48:22', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dc00045fdc86a41969644c4b521e66dd' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:48:22.064000"], ["extension", "txt"], ["name", "Test"], ["token", "dc00045fdc86a41969644c4b521e66dd"], ["updated_at", "2014-12-19 16:48:22.064000"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '55339d3f1d057b11db229f1955d96c15' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:48:22.069107"], ["extension", "txt"], ["name", "Test"], ["token", "55339d3f1d057b11db229f1955d96c15"], ["updated_at", "2014-12-19 16:48:22.069107"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6be2c2508c9adca1372393a9004d43be' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:48:22.079730"], ["extension", "txt"], ["name", "Test"], ["token", "6be2c2508c9adca1372393a9004d43be"], ["updated_at", "2014-12-19 16:48:22.079730"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'be3426e55e8e4ad1a0ee1d4daac5f982' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:48:22.086255"], ["extension", "txt"], ["name", "Test"], ["token", "be3426e55e8e4ad1a0ee1d4daac5f982"], ["updated_at", "2014-12-19 16:48:22.086255"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cc597a14026da416a129b7aaf055eca3' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:48:22.153699"], ["extension", "txt"], ["name", "Test"], ["token", "cc597a14026da416a129b7aaf055eca3"], ["updated_at", "2014-12-19 16:48:22.153699"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:48:22.168789"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:48:22.276754"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:48:22.318728"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:48:22.318075"], ["updated_at", "2014-12-19 16:48:22.318728"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:48:51', '2014-12-19 16:48:51', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:51', '2014-12-19 16:48:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:51', '2014-12-19 16:48:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:51', '2014-12-19 16:48:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:48:51', '2014-12-19 16:48:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:48:51', '2014-12-19 16:48:51', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:48:51.064431"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:49:41', '2014-12-19 16:49:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:49:41', '2014-12-19 16:49:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:49:41', '2014-12-19 16:49:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:49:41', '2014-12-19 16:49:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:49:41', '2014-12-19 16:49:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:49:41', '2014-12-19 16:49:41', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:49:51.168873"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:50:22', '2014-12-19 16:50:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:22', '2014-12-19 16:50:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:22', '2014-12-19 16:50:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:22', '2014-12-19 16:50:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:22', '2014-12-19 16:50:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:50:22', '2014-12-19 16:50:22', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:50:22.299556"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:50:57', '2014-12-19 16:50:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:57', '2014-12-19 16:50:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:57', '2014-12-19 16:50:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:57', '2014-12-19 16:50:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:50:57', '2014-12-19 16:50:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:50:57', '2014-12-19 16:50:57', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '64faa34459fec805ef728290716efa74' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:50:57.325991"], ["extension", "txt"], ["name", "Test"], ["token", "64faa34459fec805ef728290716efa74"], ["updated_at", "2014-12-19 16:50:57.325991"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5dfa84d43f9496b46b851767449561c2' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:50:57.330679"], ["extension", "txt"], ["name", "Test"], ["token", "5dfa84d43f9496b46b851767449561c2"], ["updated_at", "2014-12-19 16:50:57.330679"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 SQL (1.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '73e371587eabb83a0605178b108369cc' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:50:57.344160"], ["extension", "txt"], ["name", "Test"], ["token", "73e371587eabb83a0605178b108369cc"], ["updated_at", "2014-12-19 16:50:57.344160"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0ca9e8a97974b0d12865b5bc0090a7a6' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:50:57.348862"], ["extension", "txt"], ["name", "Test"], ["token", "0ca9e8a97974b0d12865b5bc0090a7a6"], ["updated_at", "2014-12-19 16:50:57.348862"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0f0649fc627ad145f2263337b122bab3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:50:57.411914"], ["extension", "txt"], ["name", "Test"], ["token", "0f0649fc627ad145f2263337b122bab3"], ["updated_at", "2014-12-19 16:50:57.411914"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:50:57.426829"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:50:57.527618"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:50:57.569573"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:50:57.569300"], ["updated_at", "2014-12-19 16:50:57.569573"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:04', '2014-12-19 16:51:04', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:04', '2014-12-19 16:51:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:04', '2014-12-19 16:51:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:04', '2014-12-19 16:51:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:04', '2014-12-19 16:51:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:04', '2014-12-19 16:51:04', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-19 16:51:04.833239"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 100ms (Views: 90.3ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-19 16:51:04.937448"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:04.958298"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:51:04.958298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:51:04.961503"], ["name", "test"], ["updated_at", "2014-12-19 16:51:04.961503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:51:05.062672"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:05.083746"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-19 16:51:04.000000000 Z\n updated_at: 2014-12-19 16:51:05.062672000 Z\n"], ["run_at", "2014-12-19 16:51:15.066139"], ["updated_at", "2014-12-19 16:51:05.083746"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-19 16:51:05.343638"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:51:05.874768"]]  (5.1ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:05.909545"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-19 16:51:04.000000000 Z\n updated_at: 2014-12-19 16:51:05.874768000 Z\n"], ["run_at", "2014-12-19 16:51:15.884779"], ["updated_at", "2014-12-19 16:51:05.909545"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:06', '2014-12-19 16:51:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.7ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.5ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 42ms (Views: 1.4ms | ActiveRecord: 1.1ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 0.7ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4fdae86080b3dfcdad766057f97e0b22' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:06.201568"], ["extension", "txt"], ["name", "footest barish"], ["token", "4fdae86080b3dfcdad766057f97e0b22"], ["updated_at", "2014-12-19 16:51:06.201568"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:06.214099"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-19 16:51:06.214099"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 1.6ms | ActiveRecord: 0.7ms)  (1.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 1.5ms | ActiveRecord: 0.8ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '80bf11c16941e96fcf1d146fd18c3bc5' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:06.268257"], ["extension", "txt"], ["name", "Test"], ["token", "80bf11c16941e96fcf1d146fd18c3bc5"], ["updated_at", "2014-12-19 16:51:06.268257"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dbe10c4caf4327e12e5790acc9032994' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:06.275448"], ["extension", "txt"], ["name", "Test"], ["token", "dbe10c4caf4327e12e5790acc9032994"], ["updated_at", "2014-12-19 16:51:06.275448"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '052e0eff0905a5dd9af7753f6b4e72ac' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:06.287441"], ["extension", "txt"], ["name", "Test"], ["token", "052e0eff0905a5dd9af7753f6b4e72ac"], ["updated_at", "2014-12-19 16:51:06.287441"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0f382dbf8e8a299f9ffa5609dcfafc9f' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:06.295363"], ["extension", "txt"], ["name", "Test"], ["token", "0f382dbf8e8a299f9ffa5609dcfafc9f"], ["updated_at", "2014-12-19 16:51:06.295363"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6b48de2bcf24c09677b4c9f702a7a33f' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:06.303434"], ["extension", "txt"], ["name", "Test"], ["token", "6b48de2bcf24c09677b4c9f702a7a33f"], ["updated_at", "2014-12-19 16:51:06.303434"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:51:06.314260"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:06.415507"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:06.433333"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:06.432962"], ["updated_at", "2014-12-19 16:51:06.433333"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:06', '2014-12-19 16:51:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8a4625db7517fb8fa5a1c4ce4dff681d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:51:06.614621"], ["extension", "png"], ["name", "Dummy"], ["token", "8a4625db7517fb8fa5a1c4ce4dff681d"], ["updated_at", "2014-12-19 16:51:06.614621"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:51:06.682764"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:06.789816"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:06.805545"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:06.805270"], ["updated_at", "2014-12-19 16:51:06.805545"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 25ms (Views: 1.8ms | ActiveRecord: 2.8ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:06', '2014-12-19 16:51:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:06', '2014-12-19 16:51:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:06', '2014-12-19 16:51:06', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-19 16:51:07.016419"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:51:07.023967"], ["name", "test"], ["updated_at", "2014-12-19 16:51:07.023967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:51:07.032696"], ["name", "test"], ["updated_at", "2014-12-19 16:51:07.032696"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:07.033825"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:51:07.033825"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:07.035074"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-19 16:51:07.035074"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:07.129616"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:07.146584"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:07.146258"], ["updated_at", "2014-12-19 16:51:07.146584"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:17', '2014-12-19 16:51:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:17', '2014-12-19 16:51:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:17', '2014-12-19 16:51:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:17', '2014-12-19 16:51:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:17', '2014-12-19 16:51:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:17', '2014-12-19 16:51:17', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:51:17.222535"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 70ms (Views: 59.4ms | ActiveRecord: 1.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:17.416891"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:17.437425"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:17.437086"], ["updated_at", "2014-12-19 16:51:17.437425"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 34ms (Views: 1.9ms | ActiveRecord: 3.5ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:37', '2014-12-19 16:51:37', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:37', '2014-12-19 16:51:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:37', '2014-12-19 16:51:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:37', '2014-12-19 16:51:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:37', '2014-12-19 16:51:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:37', '2014-12-19 16:51:37', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:51:37.911060"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 79ms (Views: 66.8ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:38.123140"]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:38.146418"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:38.146113"], ["updated_at", "2014-12-19 16:51:38.146418"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 35ms (Views: 1.6ms | ActiveRecord: 3.9ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:43', '2014-12-19 16:51:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:43', '2014-12-19 16:51:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:43', '2014-12-19 16:51:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:43', '2014-12-19 16:51:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:43', '2014-12-19 16:51:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:43', '2014-12-19 16:51:43', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.5ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 124ms (Views: 86.1ms | ActiveRecord: 1.0ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b85f79952f9122d26513f1421b9d7304' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:43.888846"], ["extension", "txt"], ["name", "footest barish"], ["token", "b85f79952f9122d26513f1421b9d7304"], ["updated_at", "2014-12-19 16:51:43.888846"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:43.897980"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-19 16:51:43.897980"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-19 16:51:43.929031"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:51:43.940049"], ["name", "test"], ["updated_at", "2014-12-19 16:51:43.940049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:51:43.947768"], ["name", "test"], ["updated_at", "2014-12-19 16:51:43.947768"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:43.949131"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:51:43.949131"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:43.950422"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-19 16:51:43.950422"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-19 16:51:43.975940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:51:44.080216"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:44.109723"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-19 16:51:43.000000000 Z\n updated_at: 2014-12-19 16:51:44.080216000 Z\n"], ["run_at", "2014-12-19 16:51:54.085723"], ["updated_at", "2014-12-19 16:51:44.109723"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-19 16:51:44.351715"], ["width", 800]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:51:44.830092"]]  (5.4ms) commit transaction  (0.5ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:44.871000"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-19 16:51:43.000000000 Z\n updated_at: 2014-12-19 16:51:44.830092000 Z\n"], ["run_at", "2014-12-19 16:51:54.838597"], ["updated_at", "2014-12-19 16:51:44.871000"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:45', '2014-12-19 16:51:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '78d7a369be1cf98fed3b227f7f86f794' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:45.052885"], ["extension", "txt"], ["name", "Test"], ["token", "78d7a369be1cf98fed3b227f7f86f794"], ["updated_at", "2014-12-19 16:51:45.052885"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6a46f863f34f889d6e5ec16a561d3af9' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:45.058427"], ["extension", "txt"], ["name", "Test"], ["token", "6a46f863f34f889d6e5ec16a561d3af9"], ["updated_at", "2014-12-19 16:51:45.058427"], ["uploading", "f"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8b1bdf68f1920198ed4d0feccc7554fc' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:45.072726"], ["extension", "txt"], ["name", "Test"], ["token", "8b1bdf68f1920198ed4d0feccc7554fc"], ["updated_at", "2014-12-19 16:51:45.072726"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9ef20bdf6f7202d29b53a616a0a163a5' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:45.078635"], ["extension", "txt"], ["name", "Test"], ["token", "9ef20bdf6f7202d29b53a616a0a163a5"], ["updated_at", "2014-12-19 16:51:45.078635"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1e70388fe10c9f5a1a81452cbb468b26' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:51:45.086970"], ["extension", "txt"], ["name", "Test"], ["token", "1e70388fe10c9f5a1a81452cbb468b26"], ["updated_at", "2014-12-19 16:51:45.086970"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:51:45.099461"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:45.205377"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:45.223019"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:45.222665"], ["updated_at", "2014-12-19 16:51:45.223019"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:45', '2014-12-19 16:51:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '20a0416104baf2b172c493bff0a7b41c' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:51:45.398330"], ["extension", "png"], ["name", "Dummy"], ["token", "20a0416104baf2b172c493bff0a7b41c"], ["updated_at", "2014-12-19 16:51:45.398330"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (1.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-19 16:51:45.439758"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:45.444152"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:51:45.444152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:51:45.446756"], ["name", "test"], ["updated_at", "2014-12-19 16:51:45.446756"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:51:45.454823"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:45.560197"]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:45.580285"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:45.579690"], ["updated_at", "2014-12-19 16:51:45.580285"]]  (0.7ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 30ms (Views: 1.9ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:45', '2014-12-19 16:51:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:45', '2014-12-19 16:51:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:45', '2014-12-19 16:51:45', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:51:45.904120"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:51:45.929628"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:51:45.929168"], ["updated_at", "2014-12-19 16:51:45.929628"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:51:46', '2014-12-19 16:51:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:46', '2014-12-19 16:51:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:46', '2014-12-19 16:51:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:46', '2014-12-19 16:51:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:51:46', '2014-12-19 16:51:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:51:46', '2014-12-19 16:51:46', 948421225)  (5.7ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:53:48', '2014-12-19 16:53:48', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:48', '2014-12-19 16:53:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:48', '2014-12-19 16:53:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:48', '2014-12-19 16:53:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:48', '2014-12-19 16:53:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:53:48', '2014-12-19 16:53:48', 948421225)  (4.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-19 16:53:48.429084"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:48.489115"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:53:48.489115"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:53:48.492589"], ["name", "test"], ["updated_at", "2014-12-19 16:53:48.492589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 107ms (Views: 79.5ms | ActiveRecord: 0.6ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '871001e6e99578a120170c799d7b8fbb' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:53:48.623838"], ["extension", "txt"], ["name", "footest barish"], ["token", "871001e6e99578a120170c799d7b8fbb"], ["updated_at", "2014-12-19 16:53:48.623838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:48.631299"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-19 16:53:48.631299"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:53:48.741914"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:48.762700"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-19 16:53:48.000000000 Z\n updated_at: 2014-12-19 16:53:48.741914000 Z\n"], ["run_at", "2014-12-19 16:53:58.746462"], ["updated_at", "2014-12-19 16:53:48.762700"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-19 16:53:49.016178"], ["width", 800]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-19 16:53:49.512052"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:49.528910"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-19 16:53:48.000000000 Z\n updated_at: 2014-12-19 16:53:49.512052000 Z\n"], ["run_at", "2014-12-19 16:53:59.515382"], ["updated_at", "2014-12-19 16:53:49.528910"]]  (0.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:53:49', '2014-12-19 16:53:49', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:49', '2014-12-19 16:53:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:49', '2014-12-19 16:53:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:49', '2014-12-19 16:53:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:49', '2014-12-19 16:53:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:53:49', '2014-12-19 16:53:49', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-19 16:53:49.707522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ffe60fa356ed62bc928b3e3c83fdce09' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:53:49.724277"], ["extension", "txt"], ["name", "Test"], ["token", "ffe60fa356ed62bc928b3e3c83fdce09"], ["updated_at", "2014-12-19 16:53:49.724277"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6a714e426ffb40197c1a393fbebe59e3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:53:49.727701"], ["extension", "txt"], ["name", "Test"], ["token", "6a714e426ffb40197c1a393fbebe59e3"], ["updated_at", "2014-12-19 16:53:49.727701"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '086c7457aaa55df08a11d0dfbfba7509' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:53:49.732836"], ["extension", "txt"], ["name", "Test"], ["token", "086c7457aaa55df08a11d0dfbfba7509"], ["updated_at", "2014-12-19 16:53:49.732836"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b5f69096e38532ceac3ab1df5ec7f074' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:53:49.736345"], ["extension", "txt"], ["name", "Test"], ["token", "b5f69096e38532ceac3ab1df5ec7f074"], ["updated_at", "2014-12-19 16:53:49.736345"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '78708dd0740210821485161f07675b8e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-19 16:53:49.739907"], ["extension", "txt"], ["name", "Test"], ["token", "78708dd0740210821485161f07675b8e"], ["updated_at", "2014-12-19 16:53:49.739907"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:53:49.749385"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:53:49.844767"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:49.860232"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:53:49.859965"], ["updated_at", "2014-12-19 16:53:49.860232"]]  (1.2ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:53:50', '2014-12-19 16:53:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-19 16:53:50.052707"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:53:50.146610"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:50.166035"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:53:50.165691"], ["updated_at", "2014-12-19 16:53:50.166035"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 31ms (Views: 2.3ms | ActiveRecord: 3.4ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:53:50', '2014-12-19 16:53:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-19 16:53:50.438459"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:50.456770"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-19 16:53:50.456493"], ["updated_at", "2014-12-19 16:53:50.456770"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-19 16:53:50', '2014-12-19 16:53:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-19 16:53:50', '2014-12-19 16:53:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-19 16:53:50', '2014-12-19 16:53:50', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1a60f317a09c311b8f452781e08f7946' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-19 16:53:50.879542"], ["extension", "png"], ["name", "Dummy"], ["token", "1a60f317a09c311b8f452781e08f7946"], ["updated_at", "2014-12-19 16:53:50.879542"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-19 16:53:50.914766"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:53:50.921834"], ["name", "test"], ["updated_at", "2014-12-19 16:53:50.921834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-19 16:53:50.928721"], ["name", "test"], ["updated_at", "2014-12-19 16:53:50.928721"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:50.930230"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-19 16:53:50.930230"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-19 16:53:50.931712"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-19 16:53:50.931712"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:03:45', '2014-12-22 08:03:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-22 08:03:45.366957"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 118ms (Views: 75.1ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-22 08:03:45.486444"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:45.502956"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:03:45.502956"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:03:45.505402"], ["name", "test"], ["updated_at", "2014-12-22 08:03:45.505402"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aae9805f4a911ca63dd72088139f35f7' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:03:45.512538"], ["extension", "txt"], ["name", "Test"], ["token", "aae9805f4a911ca63dd72088139f35f7"], ["updated_at", "2014-12-22 08:03:45.512538"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e1cb9e10cb2df7aa122fae9fbd364bd3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:03:45.515510"], ["extension", "txt"], ["name", "Test"], ["token", "e1cb9e10cb2df7aa122fae9fbd364bd3"], ["updated_at", "2014-12-22 08:03:45.515510"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1e550738e3afdd3df43966e77db5eda3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:03:45.520891"], ["extension", "txt"], ["name", "Test"], ["token", "1e550738e3afdd3df43966e77db5eda3"], ["updated_at", "2014-12-22 08:03:45.520891"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c92c998e89ac1d035472c8d02ff6e826' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:03:45.523387"], ["extension", "txt"], ["name", "Test"], ["token", "c92c998e89ac1d035472c8d02ff6e826"], ["updated_at", "2014-12-22 08:03:45.523387"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '62f6f5bb0bc85593611859136f9a5d46' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:03:45.526597"], ["extension", "txt"], ["name", "Test"], ["token", "62f6f5bb0bc85593611859136f9a5d46"], ["updated_at", "2014-12-22 08:03:45.526597"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:03:45.533525"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:03:45.647901"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:45.668485"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:03:45.667766"], ["updated_at", "2014-12-22 08:03:45.668485"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:03:45', '2014-12-22 08:03:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:45', '2014-12-22 08:03:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:03:45', '2014-12-22 08:03:45', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-22 08:03:45.856109"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:03:45.861440"], ["name", "test"], ["updated_at", "2014-12-22 08:03:45.861440"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:03:45.866341"], ["name", "test"], ["updated_at", "2014-12-22 08:03:45.866341"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:45.867287"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:03:45.867287"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:45.868296"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-22 08:03:45.868296"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 1.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a79f2026dda9a84b59d689e112ba5c5e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:03:45.903082"], ["extension", "txt"], ["name", "footest barish"], ["token", "a79f2026dda9a84b59d689e112ba5c5e"], ["updated_at", "2014-12-22 08:03:45.903082"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:45.905313"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-22 08:03:45.905313"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:03:46.004068"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:46.022635"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-22 08:03:45.000000000 Z\n updated_at: 2014-12-22 08:03:46.004068000 Z\n"], ["run_at", "2014-12-22 08:03:56.007451"], ["updated_at", "2014-12-22 08:03:46.022635"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-22 08:03:46.257981"], ["width", 800]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:03:46.736767"]]  (5.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:46.763270"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-22 08:03:45.000000000 Z\n updated_at: 2014-12-22 08:03:46.736767000 Z\n"], ["run_at", "2014-12-22 08:03:56.744964"], ["updated_at", "2014-12-22 08:03:46.763270"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:03:46', '2014-12-22 08:03:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:46', '2014-12-22 08:03:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:46', '2014-12-22 08:03:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:46', '2014-12-22 08:03:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:46', '2014-12-22 08:03:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:03:46', '2014-12-22 08:03:46', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '341973d2c70a26952089f48d5bbc1d7f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-22 08:03:46.947685"], ["extension", "png"], ["name", "Dummy"], ["token", "341973d2c70a26952089f48d5bbc1d7f"], ["updated_at", "2014-12-22 08:03:46.947685"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:03:47.050753"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:47.068158"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:03:47.067821"], ["updated_at", "2014-12-22 08:03:47.068158"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:03:47', '2014-12-22 08:03:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:47', '2014-12-22 08:03:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:47', '2014-12-22 08:03:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:47', '2014-12-22 08:03:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:03:47', '2014-12-22 08:03:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:03:47', '2014-12-22 08:03:47', 948421225)  (5.4ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:03:47.486569"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:03:47.573956"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:03:47.589776"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:03:47.589343"], ["updated_at", "2014-12-22 08:03:47.589776"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 27ms (Views: 2.5ms | ActiveRecord: 3.6ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:16:22', '2014-12-22 08:16:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:22', '2014-12-22 08:16:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:22', '2014-12-22 08:16:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:22', '2014-12-22 08:16:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:22', '2014-12-22 08:16:22', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:16:22', '2014-12-22 08:16:22', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 136ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:16:22.607277"]]  (0.7ms) commit transaction  (0.3ms) begin transaction SQL (1.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:22.638186"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:16:22.636962"], ["updated_at", "2014-12-22 08:16:22.638186"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:16:23', '2014-12-22 08:16:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:23', '2014-12-22 08:16:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:23', '2014-12-22 08:16:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:23', '2014-12-22 08:16:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:23', '2014-12-22 08:16:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:16:23', '2014-12-22 08:16:23', 948421225)  (5.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-22 08:16:23.127300"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:16:23.150742"], ["name", "test"], ["updated_at", "2014-12-22 08:16:23.150742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:16:23.158521"], ["name", "test"], ["updated_at", "2014-12-22 08:16:23.158521"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:23.161345"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:16:23.161345"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:23.162844"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-22 08:16:23.162844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:16:23.301125"]]  (1.0ms) commit transaction  (0.2ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:23.336762"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-22 08:16:23.000000000 Z\n updated_at: 2014-12-22 08:16:23.301125000 Z\n"], ["run_at", "2014-12-22 08:16:33.310246"], ["updated_at", "2014-12-22 08:16:23.336762"]]  (2.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-22 08:16:23.605294"], ["width", 800]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:16:24.125993"]]  (5.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:24.149591"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-22 08:16:23.000000000 Z\n updated_at: 2014-12-22 08:16:24.125993000 Z\n"], ["run_at", "2014-12-22 08:16:34.134519"], ["updated_at", "2014-12-22 08:16:24.149591"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:16:24', '2014-12-22 08:16:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:16:24.320254"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:16:24.461861"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:24.483528"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:16:24.482731"], ["updated_at", "2014-12-22 08:16:24.483528"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 36ms (Views: 1.6ms | ActiveRecord: 3.7ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:16:24', '2014-12-22 08:16:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:24', '2014-12-22 08:16:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:16:24', '2014-12-22 08:16:24', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c098d80903dc76b135b72ff8a5d79e3b' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:16:24.691941"], ["extension", "txt"], ["name", "Test"], ["token", "c098d80903dc76b135b72ff8a5d79e3b"], ["updated_at", "2014-12-22 08:16:24.691941"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aa59babe49709db27156aab2ead02e6b' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:16:24.699110"], ["extension", "txt"], ["name", "Test"], ["token", "aa59babe49709db27156aab2ead02e6b"], ["updated_at", "2014-12-22 08:16:24.699110"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fa973dfb936ce6dbdc76c9a83084f681' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:16:24.710825"], ["extension", "txt"], ["name", "Test"], ["token", "fa973dfb936ce6dbdc76c9a83084f681"], ["updated_at", "2014-12-22 08:16:24.710825"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e26a2dbc7efb953441fe136cb7c02f97' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:16:24.718249"], ["extension", "txt"], ["name", "Test"], ["token", "e26a2dbc7efb953441fe136cb7c02f97"], ["updated_at", "2014-12-22 08:16:24.718249"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c6eef367bbc073c40ea0d5be18c69242' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:16:24.723386"], ["extension", "txt"], ["name", "Test"], ["token", "c6eef367bbc073c40ea0d5be18c69242"], ["updated_at", "2014-12-22 08:16:24.723386"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:16:24.734604"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:16:24.842853"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:24.859242"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:16:24.858845"], ["updated_at", "2014-12-22 08:16:24.859242"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:16:25', '2014-12-22 08:16:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:25', '2014-12-22 08:16:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:25', '2014-12-22 08:16:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:25', '2014-12-22 08:16:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:16:25', '2014-12-22 08:16:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:16:25', '2014-12-22 08:16:25', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-22 08:16:25.061803"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.5ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:25.070919"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:16:25.070919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:16:25.077552"], ["name", "test"], ["updated_at", "2014-12-22 08:16:25.077552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.7ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 27ms (Views: 1.6ms | ActiveRecord: 1.5ms) Movie Load (0.3ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e7dd5fd7d5f5313051ad024cc285aa81' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:16:25.130168"], ["extension", "txt"], ["name", "footest barish"], ["token", "e7dd5fd7d5f5313051ad024cc285aa81"], ["updated_at", "2014-12-22 08:16:25.130168"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:16:25.136642"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-22 08:16:25.136642"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (1.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.5ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 1.2ms | ActiveRecord: 0.9ms)  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-22 08:16:25.184297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '92e359227fbc7ded0857e3268dbf9ef4' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-22 08:16:25.202238"], ["extension", "png"], ["name", "Dummy"], ["token", "92e359227fbc7ded0857e3268dbf9ef4"], ["updated_at", "2014-12-22 08:16:25.202238"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.8ms | ActiveRecord: 1.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:18:25', '2014-12-22 08:18:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5e8f8f4ed993a379fb0ce332d38dfeef' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:18:25.259474"], ["extension", "txt"], ["name", "Test"], ["token", "5e8f8f4ed993a379fb0ce332d38dfeef"], ["updated_at", "2014-12-22 08:18:25.259474"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8af0db50ca23e1e543832092d13e2a8d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:18:25.264469"], ["extension", "txt"], ["name", "Test"], ["token", "8af0db50ca23e1e543832092d13e2a8d"], ["updated_at", "2014-12-22 08:18:25.264469"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b74953472442e43feb2c405e7e36d18a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:18:25.313579"], ["extension", "txt"], ["name", "Test"], ["token", "b74953472442e43feb2c405e7e36d18a"], ["updated_at", "2014-12-22 08:18:25.313579"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0d690706dafc58bfea84225d6458715a' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:18:25.317533"], ["extension", "txt"], ["name", "Test"], ["token", "0d690706dafc58bfea84225d6458715a"], ["updated_at", "2014-12-22 08:18:25.317533"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c293d263f0ab3741f408849447553258' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:18:25.385711"], ["extension", "txt"], ["name", "Test"], ["token", "c293d263f0ab3741f408849447553258"], ["updated_at", "2014-12-22 08:18:25.385711"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:18:25.404042"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:18:25.545553"]]  (1.0ms) commit transaction  (0.2ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:25.579827"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:18:25.579220"], ["updated_at", "2014-12-22 08:18:25.579827"]]  (1.4ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 701625837) Fixture Insert (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:18:25', '2014-12-22 08:18:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:25', '2014-12-22 08:18:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:18:25', '2014-12-22 08:18:25', 948421225)  (1.4ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.5ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 55ms (Views: 2.4ms | ActiveRecord: 0.9ms) Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5617162e72cfbe75fba53346eacba380' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:18:25.891481"], ["extension", "txt"], ["name", "footest barish"], ["token", "5617162e72cfbe75fba53346eacba380"], ["updated_at", "2014-12-22 08:18:25.891481"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:25.904779"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-22 08:18:25.904779"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:18:26.112453"]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:26.131612"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-22 08:18:25.000000000 Z\n updated_at: 2014-12-22 08:18:26.112453000 Z\n"], ["run_at", "2014-12-22 08:18:36.116918"], ["updated_at", "2014-12-22 08:18:26.131612"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-22 08:18:26.397963"], ["width", 800]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:18:26.924180"]]  (4.8ms) commit transaction  (0.2ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:26.959818"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-22 08:18:25.000000000 Z\n updated_at: 2014-12-22 08:18:26.924180000 Z\n"], ["run_at", "2014-12-22 08:18:36.931730"], ["updated_at", "2014-12-22 08:18:26.959818"]]  (1.8ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:18:27', '2014-12-22 08:18:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 98413728, 245026679, 784085492) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-22 08:18:27.169958"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:27.180749"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:18:27.180749"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:18:27.187360"], ["name", "test"], ["updated_at", "2014-12-22 08:18:27.187360"]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-22 08:18:27.216025"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 0.9ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 8ms (ActiveRecord: 1.6ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a6abfb9b36f00ab0182700faad04ab49' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-22 08:18:27.250650"], ["extension", "png"], ["name", "Dummy"], ["token", "a6abfb9b36f00ab0182700faad04ab49"], ["updated_at", "2014-12-22 08:18:27.250650"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.8ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 6ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.6ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.3ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:18:27.411968"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:27.429351"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:18:27.429071"], ["updated_at", "2014-12-22 08:18:27.429351"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:18:27', '2014-12-22 08:18:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:27', '2014-12-22 08:18:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:18:27', '2014-12-22 08:18:27', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-22 08:18:27.881881"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:18:27.891893"], ["name", "test"], ["updated_at", "2014-12-22 08:18:27.891893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:18:27.904623"], ["name", "test"], ["updated_at", "2014-12-22 08:18:27.904623"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:27.908399"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:18:27.908399"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:27.911349"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-22 08:18:27.911349"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:18:27.926629"], ["width", 800]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.0ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:18:28.058584"]]  (1.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:18:28.082635"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:18:28.082364"], ["updated_at", "2014-12-22 08:18:28.082635"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 34ms (Views: 2.8ms | ActiveRecord: 4.7ms)  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:18:28', '2014-12-22 08:18:28', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:28', '2014-12-22 08:18:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:28', '2014-12-22 08:18:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:28', '2014-12-22 08:18:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:18:28', '2014-12-22 08:18:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:18:28', '2014-12-22 08:18:28', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:49:38', '2014-12-22 08:49:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:38', '2014-12-22 08:49:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:38', '2014-12-22 08:49:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:38', '2014-12-22 08:49:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:38', '2014-12-22 08:49:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:49:38', '2014-12-22 08:49:38', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:49:38.655695"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:38.672132"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:49:38.671776"], ["updated_at", "2014-12-22 08:49:38.672132"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:49:39', '2014-12-22 08:49:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 106ms (Views: 71.8ms | ActiveRecord: 0.6ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '71d857c8f9fbffbbef60538ce041e892' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:49:39.286066"], ["extension", "txt"], ["name", "footest barish"], ["token", "71d857c8f9fbffbbef60538ce041e892"], ["updated_at", "2014-12-22 08:49:39.286066"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (2.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:39.294367"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-22 08:49:39.294367"]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.4ms)  (1.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 1.6ms | ActiveRecord: 0.7ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-22 08:49:39.369427"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:39.387387"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:49:39.387387"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:49:39.394818"], ["name", "test"], ["updated_at", "2014-12-22 08:49:39.394818"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:49:39.418404"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:49:39.574533"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:39.595890"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:49:39.595592"], ["updated_at", "2014-12-22 08:49:39.595890"]]  (0.7ms) commit transaction  (0.4ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 32ms (Views: 1.7ms | ActiveRecord: 3.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:49:39', '2014-12-22 08:49:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:39', '2014-12-22 08:49:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:49:39', '2014-12-22 08:49:39', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-22 08:49:39.821979"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:49:39.834540"], ["name", "test"], ["updated_at", "2014-12-22 08:49:39.834540"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:49:39.845791"], ["name", "test"], ["updated_at", "2014-12-22 08:49:39.845791"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:39.848862"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:49:39.848862"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:39.851525"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-22 08:49:39.851525"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-22 08:49:39.872346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2d32de6e13efb96224c61ea2cf64d915' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-22 08:49:39.891839"], ["extension", "png"], ["name", "Dummy"], ["token", "2d32de6e13efb96224c61ea2cf64d915"], ["updated_at", "2014-12-22 08:49:39.891839"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.4ms | ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:49:40.041944"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:40.061142"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-22 08:49:39.000000000 Z\n updated_at: 2014-12-22 08:49:40.041944000 Z\n"], ["run_at", "2014-12-22 08:49:50.045142"], ["updated_at", "2014-12-22 08:49:40.061142"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-22 08:49:40.313288"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:49:40.836019"]]  (4.9ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:40.873546"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-22 08:49:39.000000000 Z\n updated_at: 2014-12-22 08:49:40.836019000 Z\n"], ["run_at", "2014-12-22 08:49:50.845286"], ["updated_at", "2014-12-22 08:49:40.873546"]]  (1.5ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 68463692) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:49:41', '2014-12-22 08:49:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:41', '2014-12-22 08:49:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:41', '2014-12-22 08:49:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:41', '2014-12-22 08:49:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:49:41', '2014-12-22 08:49:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:49:41', '2014-12-22 08:49:41', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c7cf9b9948846e1871c5c770dc3a5ffb' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:49:41.074179"], ["extension", "txt"], ["name", "Test"], ["token", "c7cf9b9948846e1871c5c770dc3a5ffb"], ["updated_at", "2014-12-22 08:49:41.074179"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '93291f86f01f0f4dc67295c4cef8e614' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:49:41.079381"], ["extension", "txt"], ["name", "Test"], ["token", "93291f86f01f0f4dc67295c4cef8e614"], ["updated_at", "2014-12-22 08:49:41.079381"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c70f7ef155dc2acd64a03dbcfa3536b3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:49:41.090129"], ["extension", "txt"], ["name", "Test"], ["token", "c70f7ef155dc2acd64a03dbcfa3536b3"], ["updated_at", "2014-12-22 08:49:41.090129"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '96f144fff790341fea1b243cdee10b88' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:49:41.095709"], ["extension", "txt"], ["name", "Test"], ["token", "96f144fff790341fea1b243cdee10b88"], ["updated_at", "2014-12-22 08:49:41.095709"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '652754bd40248d89439aa848559392b6' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:49:41.102573"], ["extension", "txt"], ["name", "Test"], ["token", "652754bd40248d89439aa848559392b6"], ["updated_at", "2014-12-22 08:49:41.102573"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:49:41.118416"], ["width", 800]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:49:41.228607"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:49:41.248393"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:49:41.248099"], ["updated_at", "2014-12-22 08:49:41.248393"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:51:56', '2014-12-22 08:51:56', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:56', '2014-12-22 08:51:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:56', '2014-12-22 08:51:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:56', '2014-12-22 08:51:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:56', '2014-12-22 08:51:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:51:56', '2014-12-22 08:51:56', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2014-12-22 08:51:56.914927"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:51:56.926461"], ["name", "test"], ["updated_at", "2014-12-22 08:51:56.926461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:51:56.931722"], ["name", "test"], ["updated_at", "2014-12-22 08:51:56.931722"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:56.932725"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:51:56.932725"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:56.933825"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2014-12-22 08:51:56.933825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:51:56.951025"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 67ms (Views: 62.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:51:57.150027"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:57.178215"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:51:57.177917"], ["updated_at", "2014-12-22 08:51:57.178215"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 42ms (Views: 2.7ms | ActiveRecord: 3.5ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:51:57', '2014-12-22 08:51:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:57', '2014-12-22 08:51:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:57', '2014-12-22 08:51:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:57', '2014-12-22 08:51:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:57', '2014-12-22 08:51:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:51:57', '2014-12-22 08:51:57', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:51:57.486908"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:57.518675"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2014-12-22 08:51:57.000000000 Z\n updated_at: 2014-12-22 08:51:57.486908000 Z\n"], ["run_at", "2014-12-22 08:52:07.490621"], ["updated_at", "2014-12-22 08:51:57.518675"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2014-12-22 08:51:57.792198"], ["width", 800]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2014-12-22 08:51:58.294049"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (1.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:58.321287"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2014-12-22 08:51:57.000000000 Z\n updated_at: 2014-12-22 08:51:58.294049000 Z\n"], ["run_at", "2014-12-22 08:52:08.302277"], ["updated_at", "2014-12-22 08:51:58.321287"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:51:58', '2014-12-22 08:51:58', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 6ms (Views: 2.2ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 1.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aa2249eb18591d68a802219c57b6b1b5' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:51:58.564901"], ["extension", "txt"], ["name", "Test"], ["token", "aa2249eb18591d68a802219c57b6b1b5"], ["updated_at", "2014-12-22 08:51:58.564901"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '08bf1efaad0e5622259fff0022f8c6e4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:51:58.569178"], ["extension", "txt"], ["name", "Test"], ["token", "08bf1efaad0e5622259fff0022f8c6e4"], ["updated_at", "2014-12-22 08:51:58.569178"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2e95e4b25fc17fa5b6846c926f2c813d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:51:58.577657"], ["extension", "txt"], ["name", "Test"], ["token", "2e95e4b25fc17fa5b6846c926f2c813d"], ["updated_at", "2014-12-22 08:51:58.577657"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a43983409218b772271b8a2490f783d7' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:51:58.581000"], ["extension", "txt"], ["name", "Test"], ["token", "a43983409218b772271b8a2490f783d7"], ["updated_at", "2014-12-22 08:51:58.581000"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e0c6e1bc9638327fce1a86741383504b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:51:58.589267"], ["extension", "txt"], ["name", "Test"], ["token", "e0c6e1bc9638327fce1a86741383504b"], ["updated_at", "2014-12-22 08:51:58.589267"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2014-12-22 08:51:58.602710"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:51:58.708229"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:58.726036"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:51:58.725762"], ["updated_at", "2014-12-22 08:51:58.726036"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:51:58', '2014-12-22 08:51:58', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:58', '2014-12-22 08:51:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:51:58', '2014-12-22 08:51:58', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'efc84f3d6518195c454f6abdb43e12c6' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2014-12-22 08:51:58.926025"], ["extension", "png"], ["name", "Dummy"], ["token", "efc84f3d6518195c454f6abdb43e12c6"], ["updated_at", "2014-12-22 08:51:58.926025"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2014-12-22 08:51:59.062908"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:59.081942"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2014-12-22 08:51:59.081384"], ["updated_at", "2014-12-22 08:51:59.081942"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2014-12-22 08:51:59', '2014-12-22 08:51:59', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:59', '2014-12-22 08:51:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:59', '2014-12-22 08:51:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:59', '2014-12-22 08:51:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2014-12-22 08:51:59', '2014-12-22 08:51:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2014-12-22 08:51:59', '2014-12-22 08:51:59', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 1.0ms | ActiveRecord: 0.4ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5f6956d8c169c122c8a1c626b80933ec' LIMIT 1 SQL (0.9ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2014-12-22 08:51:59.539957"], ["extension", "txt"], ["name", "footest barish"], ["token", "5f6956d8c169c122c8a1c626b80933ec"], ["updated_at", "2014-12-22 08:51:59.539957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:59.548672"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2014-12-22 08:51:59.548672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.6ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.4ms)  (0.3ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2014-12-22 08:51:59.585274"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2014-12-22 08:51:59.591623"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2014-12-22 08:51:59.591623"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2014-12-22 08:51:59.596107"], ["name", "test"], ["updated_at", "2014-12-22 08:51:59.596107"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 7ms (ActiveRecord: 1.4ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2014-12-22 08:51:59.636192"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:14:42', '2015-04-07 07:14:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:42', '2015-04-07 07:14:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:42', '2015-04-07 07:14:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:42', '2015-04-07 07:14:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:42', '2015-04-07 07:14:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:14:42', '2015-04-07 07:14:42', 948421225)  (1.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:42.748545"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-07 07:14:42.748545"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-07 07:14:42.752911"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:42.765672"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-07 07:14:42.765672"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:14:42.768761"], ["name", "test"], ["updated_at", "2015-04-07 07:14:42.768761"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 07:14:42.780621"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 94ms (Views: 89.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:14:42.972973"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:42.992910"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:14:42.992616"], ["updated_at", "2015-04-07 07:14:42.992910"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 31ms (Views: 1.9ms | ActiveRecord: 2.8ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:14:43', '2015-04-07 07:14:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fc0b9486fcd51f4e6eb1145e5d756c0a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-07 07:14:43.215483"], ["extension", "png"], ["name", "Dummy"], ["token", "fc0b9486fcd51f4e6eb1145e5d756c0a"], ["updated_at", "2015-04-07 07:14:43.215483"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 0.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '012484ff5c8d5964c1c8614a2b64ec74' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:14:43.285577"], ["extension", "txt"], ["name", "footest barish"], ["token", "012484ff5c8d5964c1c8614a2b64ec74"], ["updated_at", "2015-04-07 07:14:43.285577"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:43.292825"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-07 07:14:43.292825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bfbc9d248b7024c5c852bcac4b0932ab' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:14:43.317637"], ["extension", "txt"], ["name", "Test"], ["token", "bfbc9d248b7024c5c852bcac4b0932ab"], ["updated_at", "2015-04-07 07:14:43.317637"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b5d94d9985c5e8189db830d93fe409b7' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:14:43.322952"], ["extension", "txt"], ["name", "Test"], ["token", "b5d94d9985c5e8189db830d93fe409b7"], ["updated_at", "2015-04-07 07:14:43.322952"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '44f5417f285d29e7673273e0c8adf1c4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:14:43.331216"], ["extension", "txt"], ["name", "Test"], ["token", "44f5417f285d29e7673273e0c8adf1c4"], ["updated_at", "2015-04-07 07:14:43.331216"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '73a258890ea603fe250aab638c608cd0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:14:43.334082"], ["extension", "txt"], ["name", "Test"], ["token", "73a258890ea603fe250aab638c608cd0"], ["updated_at", "2015-04-07 07:14:43.334082"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e836e5997fc8dbdad652573499f157ea' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:14:43.337830"], ["extension", "txt"], ["name", "Test"], ["token", "e836e5997fc8dbdad652573499f157ea"], ["updated_at", "2015-04-07 07:14:43.337830"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 07:14:43.344040"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:14:43.470370"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:43.487330"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:14:43.486834"], ["updated_at", "2015-04-07 07:14:43.487330"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:14:43', '2015-04-07 07:14:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:43', '2015-04-07 07:14:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 245026679) Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:14:43', '2015-04-07 07:14:43', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-07 07:14:43.666577"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:14:43.672884"], ["name", "test"], ["updated_at", "2015-04-07 07:14:43.672884"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:14:43.700490"], ["name", "test"], ["updated_at", "2015-04-07 07:14:43.700490"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:43.701626"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-07 07:14:43.701626"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:43.702619"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-07 07:14:43.702619"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 07:14:43.803422"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:43.824339"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-07 07:14:43.000000000 Z\n updated_at: 2015-04-07 07:14:43.803422000 Z\n"], ["run_at", "2015-04-07 07:14:53.807618"], ["updated_at", "2015-04-07 07:14:43.824339"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-07 07:14:44.065996"], ["width", 800]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 07:14:44.565425"]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:44.592791"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-07 07:14:43.000000000 Z\n updated_at: 2015-04-07 07:14:44.565425000 Z\n"], ["run_at", "2015-04-07 07:14:54.573848"], ["updated_at", "2015-04-07 07:14:44.592791"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:14:44', '2015-04-07 07:14:44', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:44', '2015-04-07 07:14:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:44', '2015-04-07 07:14:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:44', '2015-04-07 07:14:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:44', '2015-04-07 07:14:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:14:44', '2015-04-07 07:14:44', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:14:44.854509"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:14:44.873961"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:14:44.873656"], ["updated_at", "2015-04-07 07:14:44.873961"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:14:45', '2015-04-07 07:14:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:45', '2015-04-07 07:14:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:45', '2015-04-07 07:14:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:45', '2015-04-07 07:14:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:14:45', '2015-04-07 07:14:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:14:45', '2015-04-07 07:14:45', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-07 07:14:45.313279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:15:27', '2015-04-07 07:15:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:15:27.511828"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:15:27.528138"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:15:27.527850"], ["updated_at", "2015-04-07 07:15:27.528138"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:15:27', '2015-04-07 07:15:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 98413728, 245026679, 784085492) Fixture Insert (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:27', '2015-04-07 07:15:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:15:27', '2015-04-07 07:15:27', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 07:15:27.910546"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 63ms (Views: 54.0ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:15:28.066578"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:15:28.085593"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:15:28.085311"], ["updated_at", "2015-04-07 07:15:28.085593"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 30ms (Views: 1.6ms | ActiveRecord: 2.8ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:15:28', '2015-04-07 07:15:28', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:28', '2015-04-07 07:15:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:28', '2015-04-07 07:15:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:28', '2015-04-07 07:15:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:28', '2015-04-07 07:15:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:15:28', '2015-04-07 07:15:28', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-07 07:15:28.258131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1183249a6babdfee5cc1a6011c376d2a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-07 07:15:28.295393"], ["extension", "png"], ["name", "Dummy"], ["token", "1183249a6babdfee5cc1a6011c376d2a"], ["updated_at", "2015-04-07 07:15:28.295393"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 07:15:28.457376"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:15:28.471311"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-07 07:15:28.000000000 Z\n updated_at: 2015-04-07 07:15:28.457376000 Z\n"], ["run_at", "2015-04-07 07:15:38.460378"], ["updated_at", "2015-04-07 07:15:28.471311"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-07 07:15:28.757661"], ["width", 800]]  (1.4ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 07:15:29.288077"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:15:29.303837"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-07 07:15:28.000000000 Z\n updated_at: 2015-04-07 07:15:29.288077000 Z\n"], ["run_at", "2015-04-07 07:15:39.291103"], ["updated_at", "2015-04-07 07:15:29.303837"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:15:29', '2015-04-07 07:15:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4d013bde539d7aab9af61b2baad8485d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:15:29.473661"], ["extension", "txt"], ["name", "Test"], ["token", "4d013bde539d7aab9af61b2baad8485d"], ["updated_at", "2015-04-07 07:15:29.473661"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6cafd40df463523e2bb93d00d8d2a3a2' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:15:29.476785"], ["extension", "txt"], ["name", "Test"], ["token", "6cafd40df463523e2bb93d00d8d2a3a2"], ["updated_at", "2015-04-07 07:15:29.476785"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7994a50b105c66b50ea6f9f4ee541ffa' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:15:29.498791"], ["extension", "txt"], ["name", "Test"], ["token", "7994a50b105c66b50ea6f9f4ee541ffa"], ["updated_at", "2015-04-07 07:15:29.498791"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1248b75fd2096c649b89ad005dd1d142' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:15:29.501430"], ["extension", "txt"], ["name", "Test"], ["token", "1248b75fd2096c649b89ad005dd1d142"], ["updated_at", "2015-04-07 07:15:29.501430"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a686212aef4cd4f03e195160805113aa' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:15:29.504461"], ["extension", "txt"], ["name", "Test"], ["token", "a686212aef4cd4f03e195160805113aa"], ["updated_at", "2015-04-07 07:15:29.504461"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 07:15:29.510374"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:15:29.591538"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:15:29.618087"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:15:29.617729"], ["updated_at", "2015-04-07 07:15:29.618087"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:15:29', '2015-04-07 07:15:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:15:29', '2015-04-07 07:15:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:15:29', '2015-04-07 07:15:29', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:15:29.802722"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-07 07:15:29.802722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (5.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-07 07:36:36.779169"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:36.783049"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-07 07:36:36.783049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:36:36.785166"], ["name", "test"], ["updated_at", "2015-04-07 07:36:36.785166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 28ms (Views: 1.5ms | ActiveRecord: 0.4ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2823d43f1bb6356b5dbd89f75c37f806' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:36.832217"], ["extension", "txt"], ["name", "footest barish"], ["token", "2823d43f1bb6356b5dbd89f75c37f806"], ["updated_at", "2015-04-07 07:36:36.832217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:36.840059"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-07 07:36:36.840059"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-07 07:36:36.863997"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:36:36.868076"], ["name", "test"], ["updated_at", "2015-04-07 07:36:36.868076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:36:36.872970"], ["name", "test"], ["updated_at", "2015-04-07 07:36:36.872970"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:36.873900"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-07 07:36:36.873900"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:36.874641"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-07 07:36:36.874641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:36:44', '2015-04-07 07:36:44', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 07:36:44.495429"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 63ms (Views: 55.4ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:36:44.668558"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:44.691836"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:36:44.691538"], ["updated_at", "2015-04-07 07:36:44.691836"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 38ms (Views: 2.1ms | ActiveRecord: 3.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:36:44', '2015-04-07 07:36:44', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:44', '2015-04-07 07:36:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:36:44', '2015-04-07 07:36:44', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-07 07:36:44.922411"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:36:44.935792"], ["name", "test"], ["updated_at", "2015-04-07 07:36:44.935792"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:36:44.941096"], ["name", "test"], ["updated_at", "2015-04-07 07:36:44.941096"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:44.942084"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-07 07:36:44.942084"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:44.942937"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-07 07:36:44.942937"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a0e2c03cdf49b1171d0d8ee1981b6ef1' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:44.960892"], ["extension", "txt"], ["name", "Test"], ["token", "a0e2c03cdf49b1171d0d8ee1981b6ef1"], ["updated_at", "2015-04-07 07:36:44.960892"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fcc901f5901c5bc32baa7bbf3e53ea44' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:44.964381"], ["extension", "txt"], ["name", "Test"], ["token", "fcc901f5901c5bc32baa7bbf3e53ea44"], ["updated_at", "2015-04-07 07:36:44.964381"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4d08d1aab4c4923683e6312453634bb6' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:44.969252"], ["extension", "txt"], ["name", "Test"], ["token", "4d08d1aab4c4923683e6312453634bb6"], ["updated_at", "2015-04-07 07:36:44.969252"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7b30ded6174426132e8027a08f212c4c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:44.972248"], ["extension", "txt"], ["name", "Test"], ["token", "7b30ded6174426132e8027a08f212c4c"], ["updated_at", "2015-04-07 07:36:44.972248"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3ee3c656701a4cc821ec35671f37b633' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:44.975913"], ["extension", "txt"], ["name", "Test"], ["token", "3ee3c656701a4cc821ec35671f37b633"], ["updated_at", "2015-04-07 07:36:44.975913"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 07:36:44.983066"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:36:45.076983"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:45.097359"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:36:45.096998"], ["updated_at", "2015-04-07 07:36:45.097359"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:36:45', '2015-04-07 07:36:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 07:36:45.391907"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:45.413563"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 07:36:45.413311"], ["updated_at", "2015-04-07 07:36:45.413563"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:36:45', '2015-04-07 07:36:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:45', '2015-04-07 07:36:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:36:45', '2015-04-07 07:36:45', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 07:36:45.970633"]]  (0.7ms) commit transaction  (0.7ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:45.991720"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-07 07:36:45.000000000 Z\n updated_at: 2015-04-07 07:36:45.970633000 Z\n"], ["run_at", "2015-04-07 07:36:55.975046"], ["updated_at", "2015-04-07 07:36:45.991720"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-07 07:36:46.266780"], ["width", 800]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 07:36:46.828777"]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:46.880930"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-07 07:36:45.000000000 Z\n updated_at: 2015-04-07 07:36:46.828777000 Z\n"], ["run_at", "2015-04-07 07:36:56.835936"], ["updated_at", "2015-04-07 07:36:46.880930"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 07:36:47', '2015-04-07 07:36:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:47', '2015-04-07 07:36:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:47', '2015-04-07 07:36:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:47', '2015-04-07 07:36:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 07:36:47', '2015-04-07 07:36:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 07:36:47', '2015-04-07 07:36:47', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-07 07:36:47.057754"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:47.069379"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-07 07:36:47.069379"]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-07 07:36:47.073228"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:47.076844"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-07 07:36:47.076844"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 07:36:47.078965"], ["name", "test"], ["updated_at", "2015-04-07 07:36:47.078965"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '08f36762fdc3262647a72e6ce355e8da' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-07 07:36:47.086405"], ["extension", "png"], ["name", "Dummy"], ["token", "08f36762fdc3262647a72e6ce355e8da"], ["updated_at", "2015-04-07 07:36:47.086405"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 22ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 0.6ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f01b92003643fee4db4ac803e48e9444' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 07:36:47.156661"], ["extension", "txt"], ["name", "footest barish"], ["token", "f01b92003643fee4db4ac803e48e9444"], ["updated_at", "2015-04-07 07:36:47.156661"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 07:36:47.159209"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-07 07:36:47.159209"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 08:54:44', '2015-04-07 08:54:44', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:44', '2015-04-07 08:54:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:44', '2015-04-07 08:54:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:44', '2015-04-07 08:54:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:44', '2015-04-07 08:54:44', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 08:54:44', '2015-04-07 08:54:44', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 128ms (Views: 87.8ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0d3a69b4a81101856725bcfdc56adfc4' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 08:54:44.676774"], ["extension", "txt"], ["name", "footest barish"], ["token", "0d3a69b4a81101856725bcfdc56adfc4"], ["updated_at", "2015-04-07 08:54:44.676774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:44.689293"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-07 08:54:44.689293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 08:54:44.712975"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 08:54:44.826448"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:44.850033"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 08:54:44.848811"], ["updated_at", "2015-04-07 08:54:44.850033"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 39ms (Views: 1.9ms | ActiveRecord: 4.3ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 08:54:45', '2015-04-07 08:54:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 948421225)  (1.1ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 08:54:45.135028"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:45.157111"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 08:54:45.156785"], ["updated_at", "2015-04-07 08:54:45.157111"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 08:54:45', '2015-04-07 08:54:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:45', '2015-04-07 08:54:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 08:54:45', '2015-04-07 08:54:45', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 08:54:45.715864"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:45.736969"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-07 08:54:45.000000000 Z\n updated_at: 2015-04-07 08:54:45.715864000 Z\n"], ["run_at", "2015-04-07 08:54:55.719657"], ["updated_at", "2015-04-07 08:54:45.736969"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-07 08:54:46.018749"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 08:54:46.576955"]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:46.602263"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-07 08:54:45.000000000 Z\n updated_at: 2015-04-07 08:54:46.576955000 Z\n"], ["run_at", "2015-04-07 08:54:56.584847"], ["updated_at", "2015-04-07 08:54:46.602263"]]  (0.7ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 08:54:46', '2015-04-07 08:54:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:46', '2015-04-07 08:54:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:46', '2015-04-07 08:54:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:46', '2015-04-07 08:54:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:46', '2015-04-07 08:54:46', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 08:54:46', '2015-04-07 08:54:46', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-07 08:54:46.812076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-07 08:54:46.822360"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 08:54:46.836341"], ["name", "test"], ["updated_at", "2015-04-07 08:54:46.836341"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 08:54:46.842298"], ["name", "test"], ["updated_at", "2015-04-07 08:54:46.842298"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:46.843247"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-07 08:54:46.843247"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:46.844433"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-07 08:54:46.844433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c392c16c9f9fc3b8660b9836c1b35850' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 08:54:46.848835"], ["extension", "txt"], ["name", "Test"], ["token", "c392c16c9f9fc3b8660b9836c1b35850"], ["updated_at", "2015-04-07 08:54:46.848835"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e10e0c8beff56ceeeeb7ce8edf2d775d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 08:54:46.851650"], ["extension", "txt"], ["name", "Test"], ["token", "e10e0c8beff56ceeeeb7ce8edf2d775d"], ["updated_at", "2015-04-07 08:54:46.851650"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '72e26234c4d2e524ddb5ddab11b9fc48' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 08:54:46.857005"], ["extension", "txt"], ["name", "Test"], ["token", "72e26234c4d2e524ddb5ddab11b9fc48"], ["updated_at", "2015-04-07 08:54:46.857005"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'acae91cf7bfd71894b2ee1f75d7152cd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 08:54:46.860231"], ["extension", "txt"], ["name", "Test"], ["token", "acae91cf7bfd71894b2ee1f75d7152cd"], ["updated_at", "2015-04-07 08:54:46.860231"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '56569b0b1d13c06cb9aaa833127f46ae' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 08:54:46.864298"], ["extension", "txt"], ["name", "Test"], ["token", "56569b0b1d13c06cb9aaa833127f46ae"], ["updated_at", "2015-04-07 08:54:46.864298"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (15.6ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 08:54:46.887138"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 08:54:46.983299"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:47.000850"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 08:54:47.000514"], ["updated_at", "2015-04-07 08:54:47.000850"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 08:54:47', '2015-04-07 08:54:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:47', '2015-04-07 08:54:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:47', '2015-04-07 08:54:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:47', '2015-04-07 08:54:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 08:54:47', '2015-04-07 08:54:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 08:54:47', '2015-04-07 08:54:47', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ab93a3cadf6e3b56a6734d110db74d67' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-07 08:54:47.198686"], ["extension", "png"], ["name", "Dummy"], ["token", "ab93a3cadf6e3b56a6734d110db74d67"], ["updated_at", "2015-04-07 08:54:47.198686"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.6ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:47.257324"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-07 08:54:47.257324"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-07 08:54:47.261232"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 08:54:47.265335"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-07 08:54:47.265335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 08:54:47.267904"], ["name", "test"], ["updated_at", "2015-04-07 08:54:47.267904"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 15:07:12', '2015-04-07 15:07:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-07 15:07:12.367710"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 15:07:12.379039"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 15:07:12.504259"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:12.525726"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 15:07:12.525220"], ["updated_at", "2015-04-07 15:07:12.525726"]]  (0.9ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 37ms (Views: 2.0ms | ActiveRecord: 4.0ms)  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 15:07:12', '2015-04-07 15:07:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:12', '2015-04-07 15:07:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 15:07:12', '2015-04-07 15:07:12', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a2647ba3d5746c06826e4b751084f882' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 15:07:12.748348"], ["extension", "txt"], ["name", "Test"], ["token", "a2647ba3d5746c06826e4b751084f882"], ["updated_at", "2015-04-07 15:07:12.748348"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6961b75e31b22de1c03076244b7e119f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 15:07:12.752041"], ["extension", "txt"], ["name", "Test"], ["token", "6961b75e31b22de1c03076244b7e119f"], ["updated_at", "2015-04-07 15:07:12.752041"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a935d5721eb385c0d3c8a6db2c3853ff' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 15:07:12.757836"], ["extension", "txt"], ["name", "Test"], ["token", "a935d5721eb385c0d3c8a6db2c3853ff"], ["updated_at", "2015-04-07 15:07:12.757836"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '403ed2aed3e86198ebabd8cb98118a54' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 15:07:12.760528"], ["extension", "txt"], ["name", "Test"], ["token", "403ed2aed3e86198ebabd8cb98118a54"], ["updated_at", "2015-04-07 15:07:12.760528"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0374b1dec78ba423b1b00a3ab38da0e6' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 15:07:12.765180"], ["extension", "txt"], ["name", "Test"], ["token", "0374b1dec78ba423b1b00a3ab38da0e6"], ["updated_at", "2015-04-07 15:07:12.765180"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-07 15:07:12.781345"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 15:07:12.874161"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:12.890893"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 15:07:12.890628"], ["updated_at", "2015-04-07 15:07:12.890893"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 15:07:13', '2015-04-07 15:07:13', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:13', '2015-04-07 15:07:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:13', '2015-04-07 15:07:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:13', '2015-04-07 15:07:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:13', '2015-04-07 15:07:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 15:07:13', '2015-04-07 15:07:13', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 15:07:13.204469"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:13.225217"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-07 15:07:13.000000000 Z\n updated_at: 2015-04-07 15:07:13.204469000 Z\n"], ["run_at", "2015-04-07 15:07:23.208682"], ["updated_at", "2015-04-07 15:07:13.225217"]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-07 15:07:13.500524"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-07 15:07:14.043510"]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:14.065147"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-07 15:07:13.000000000 Z\n updated_at: 2015-04-07 15:07:14.043510000 Z\n"], ["run_at", "2015-04-07 15:07:24.051049"], ["updated_at", "2015-04-07 15:07:14.065147"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 15:07:14', '2015-04-07 15:07:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-07 15:07:14.364769"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:14.383075"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-07 15:07:14.382805"], ["updated_at", "2015-04-07 15:07:14.383075"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-07 15:07:14', '2015-04-07 15:07:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-07 15:07:14', '2015-04-07 15:07:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-07 15:07:14', '2015-04-07 15:07:14', 948421225)  (0.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8cc8804155854505433dbd5a2caa3d68' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-07 15:07:14.858174"], ["extension", "png"], ["name", "Dummy"], ["token", "8cc8804155854505433dbd5a2caa3d68"], ["updated_at", "2015-04-07 15:07:14.858174"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-07 15:07:14.910882"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 15:07:14.915416"], ["name", "test"], ["updated_at", "2015-04-07 15:07:14.915416"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 15:07:14.920560"], ["name", "test"], ["updated_at", "2015-04-07 15:07:14.920560"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:14.921476"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-07 15:07:14.921476"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:14.922709"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-07 15:07:14.922709"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 13ms (Views: 1.0ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '26461fe8a3fcb8032a79ab8ca0b63bdf' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-07 15:07:14.955824"], ["extension", "txt"], ["name", "footest barish"], ["token", "26461fe8a3fcb8032a79ab8ca0b63bdf"], ["updated_at", "2015-04-07 15:07:14.955824"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:14.958595"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-07 15:07:14.958595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:14.984594"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-07 15:07:14.984594"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-07 15:07:14.989196"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-07 15:07:15.013470"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-07 15:07:15.013470"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-07 15:07:15.015773"], ["name", "test"], ["updated_at", "2015-04-07 15:07:15.015773"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:13', '2015-04-08 09:17:13', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:13', '2015-04-08 09:17:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:13', '2015-04-08 09:17:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:13', '2015-04-08 09:17:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:13', '2015-04-08 09:17:13', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:13', '2015-04-08 09:17:13', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:13.146430"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:17:13.146430"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:17:13.150315"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:13.161938"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:17:13.161938"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:17:13.163954"], ["name", "test"], ["updated_at", "2015-04-08 09:17:13.163954"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:17:13.295239"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:13.316805"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:17:13.000000000 Z\n updated_at: 2015-04-08 09:17:13.295239000 Z\n"], ["run_at", "2015-04-08 09:17:23.299055"], ["updated_at", "2015-04-08 09:17:13.316805"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:17:13.557488"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:17:14.048772"]]  (5.1ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:14.076079"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:17:13.000000000 Z\n updated_at: 2015-04-08 09:17:14.048772000 Z\n"], ["run_at", "2015-04-08 09:17:24.056448"], ["updated_at", "2015-04-08 09:17:14.076079"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:14', '2015-04-08 09:17:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '13a8f386383d416a6bcfed23cb4babfa' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:14.259847"], ["extension", "txt"], ["name", "Test"], ["token", "13a8f386383d416a6bcfed23cb4babfa"], ["updated_at", "2015-04-08 09:17:14.259847"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9414cf776381b780cba316880df346da' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:14.263377"], ["extension", "txt"], ["name", "Test"], ["token", "9414cf776381b780cba316880df346da"], ["updated_at", "2015-04-08 09:17:14.263377"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (2.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bea647c55a71ba4edf88b4eecca73f33' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:14.270487"], ["extension", "txt"], ["name", "Test"], ["token", "bea647c55a71ba4edf88b4eecca73f33"], ["updated_at", "2015-04-08 09:17:14.270487"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '91028704a4c6f0839f1e40dbb191b2cb' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:14.274425"], ["extension", "txt"], ["name", "Test"], ["token", "91028704a4c6f0839f1e40dbb191b2cb"], ["updated_at", "2015-04-08 09:17:14.274425"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b7b80d35815c1a12a01de983c253c2e5' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:14.278097"], ["extension", "txt"], ["name", "Test"], ["token", "b7b80d35815c1a12a01de983c253c2e5"], ["updated_at", "2015-04-08 09:17:14.278097"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (12.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:17:14.298230"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:17:14.395346"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:14.415518"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:17:14.415187"], ["updated_at", "2015-04-08 09:17:14.415518"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:14', '2015-04-08 09:17:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:14', '2015-04-08 09:17:14', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:14', '2015-04-08 09:17:14', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:17:14.642780"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:17:14.647365"], ["name", "test"], ["updated_at", "2015-04-08 09:17:14.647365"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:17:14.651756"], ["name", "test"], ["updated_at", "2015-04-08 09:17:14.651756"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:14.652639"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:17:14.652639"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:14.669238"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:17:14.669238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:17:14.682800"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:17:14.819817"]]  (1.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:14.840213"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:17:14.839795"], ["updated_at", "2015-04-08 09:17:14.840213"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:15', '2015-04-08 09:17:15', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 153115190) Fixture Delete (1.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:17:15.291941"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:17:15.390372"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (1.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:15.407605"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:17:15.407333"], ["updated_at", "2015-04-08 09:17:15.407605"]]  (1.1ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 30ms (Views: 2.4ms | ActiveRecord: 4.5ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:15', '2015-04-08 09:17:15', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:15', '2015-04-08 09:17:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:15', '2015-04-08 09:17:15', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bf67dcb41e68bb42d2be7a82dcf17972' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:17:15.606282"], ["extension", "png"], ["name", "Dummy"], ["token", "bf67dcb41e68bb42d2be7a82dcf17972"], ["updated_at", "2015-04-08 09:17:15.606282"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 0.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1a815d6a651042926bbd8881bada6ace' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:15.656157"], ["extension", "txt"], ["name", "footest barish"], ["token", "1a815d6a651042926bbd8881bada6ace"], ["updated_at", "2015-04-08 09:17:15.656157"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:15.658507"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:17:15.658507"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:40', '2015-04-08 09:17:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 153115190) Fixture Delete (0.7ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:40', '2015-04-08 09:17:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:40', '2015-04-08 09:17:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:40', '2015-04-08 09:17:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:40', '2015-04-08 09:17:40', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:40', '2015-04-08 09:17:40', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:17:40.983837"]]  (0.5ms) commit transaction  (0.1ms) begin transaction SQL (1.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:41.016013"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:17:41.015497"], ["updated_at", "2015-04-08 09:17:41.016013"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:41', '2015-04-08 09:17:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 31ms (Views: 1.5ms | ActiveRecord: 0.7ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dbf7173b6379bd747fd6c20461c55c4d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:41.559935"], ["extension", "txt"], ["name", "footest barish"], ["token", "dbf7173b6379bd747fd6c20461c55c4d"], ["updated_at", "2015-04-08 09:17:41.559935"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:41.569612"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:17:41.569612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:17:41.595440"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:17:41.612337"], ["name", "test"], ["updated_at", "2015-04-08 09:17:41.612337"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:17:41.617504"], ["name", "test"], ["updated_at", "2015-04-08 09:17:41.617504"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:41.618457"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:17:41.618457"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:41.619232"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:17:41.619232"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:17:41.624976"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 0.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:17:41.737437"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:41.756727"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:17:41.756401"], ["updated_at", "2015-04-08 09:17:41.756727"]]  (0.7ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 30ms (Views: 1.7ms | ActiveRecord: 3.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:41', '2015-04-08 09:17:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:41', '2015-04-08 09:17:41', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:41', '2015-04-08 09:17:41', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8a18b8d83214c8807e66a1650d6a7e64' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:17:41.968061"], ["extension", "png"], ["name", "Dummy"], ["token", "8a18b8d83214c8807e66a1650d6a7e64"], ["updated_at", "2015-04-08 09:17:41.968061"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd1b34995cd5d3cf359b705c32a239d46' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:42.023438"], ["extension", "txt"], ["name", "Test"], ["token", "d1b34995cd5d3cf359b705c32a239d46"], ["updated_at", "2015-04-08 09:17:42.023438"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ca23d62fde0fa75da91a989de34e0159' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:42.026806"], ["extension", "txt"], ["name", "Test"], ["token", "ca23d62fde0fa75da91a989de34e0159"], ["updated_at", "2015-04-08 09:17:42.026806"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6a0206d4073f70ea7fbdc7600c16949e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:42.032102"], ["extension", "txt"], ["name", "Test"], ["token", "6a0206d4073f70ea7fbdc7600c16949e"], ["updated_at", "2015-04-08 09:17:42.032102"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c766b4be4c028f76b28694c7bbb396f8' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:42.035993"], ["extension", "txt"], ["name", "Test"], ["token", "c766b4be4c028f76b28694c7bbb396f8"], ["updated_at", "2015-04-08 09:17:42.035993"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3ba8f50c8c21efcd5c78fc48d359b0d8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:17:42.039857"], ["extension", "txt"], ["name", "Test"], ["token", "3ba8f50c8c21efcd5c78fc48d359b0d8"], ["updated_at", "2015-04-08 09:17:42.039857"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:17:42.049439"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:17:42.142114"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:42.160495"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:17:42.160206"], ["updated_at", "2015-04-08 09:17:42.160495"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:42', '2015-04-08 09:17:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 153115190) Fixture Delete (2.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:42', '2015-04-08 09:17:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:42', '2015-04-08 09:17:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:42', '2015-04-08 09:17:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:42', '2015-04-08 09:17:42', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:42', '2015-04-08 09:17:42', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:42.362320"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:17:42.362320"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:17:42.366739"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:42.370497"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:17:42.370497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:17:42.372660"], ["name", "test"], ["updated_at", "2015-04-08 09:17:42.372660"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:17:42.381762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:17:42.474422"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (1.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:42.492852"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:17:42.000000000 Z\n updated_at: 2015-04-08 09:17:42.474422000 Z\n"], ["run_at", "2015-04-08 09:17:52.477592"], ["updated_at", "2015-04-08 09:17:42.492852"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:17:42.742709"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:17:43.247429"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:17:43.268255"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:17:42.000000000 Z\n updated_at: 2015-04-08 09:17:43.247429000 Z\n"], ["run_at", "2015-04-08 09:17:53.251586"], ["updated_at", "2015-04-08 09:17:43.268255"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:17:43', '2015-04-08 09:17:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:43', '2015-04-08 09:17:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:43', '2015-04-08 09:17:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:43', '2015-04-08 09:17:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:17:43', '2015-04-08 09:17:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:17:43', '2015-04-08 09:17:43', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:19:32', '2015-04-08 09:19:32', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 33ms (Views: 1.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 0.8ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5d83dfabce8416f91c0e11fdee3e04e7' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:19:32.268979"], ["extension", "txt"], ["name", "footest barish"], ["token", "5d83dfabce8416f91c0e11fdee3e04e7"], ["updated_at", "2015-04-08 09:19:32.268979"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:32.277436"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:19:32.277436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '64234aed43af335e29c9b8f06a0aa316' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:19:32.296748"], ["extension", "txt"], ["name", "Test"], ["token", "64234aed43af335e29c9b8f06a0aa316"], ["updated_at", "2015-04-08 09:19:32.296748"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b858b73b61a0508f9d544be5fa140c09' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:19:32.300701"], ["extension", "txt"], ["name", "Test"], ["token", "b858b73b61a0508f9d544be5fa140c09"], ["updated_at", "2015-04-08 09:19:32.300701"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'de951699994030909ad9f3213a0dd7a5' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:19:32.306125"], ["extension", "txt"], ["name", "Test"], ["token", "de951699994030909ad9f3213a0dd7a5"], ["updated_at", "2015-04-08 09:19:32.306125"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '393bfb4415c3fc64b872a977ea82a9ca' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:19:32.308521"], ["extension", "txt"], ["name", "Test"], ["token", "393bfb4415c3fc64b872a977ea82a9ca"], ["updated_at", "2015-04-08 09:19:32.308521"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '83e5976a4d3d559ed36df8b71fd22d0b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:19:32.311741"], ["extension", "txt"], ["name", "Test"], ["token", "83e5976a4d3d559ed36df8b71fd22d0b"], ["updated_at", "2015-04-08 09:19:32.311741"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:19:32.324891"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:19:32.471638"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:32.492160"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:19:32.491883"], ["updated_at", "2015-04-08 09:19:32.492160"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:19:32', '2015-04-08 09:19:32', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:32', '2015-04-08 09:19:32', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:19:32', '2015-04-08 09:19:32', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:32.685510"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:19:32.685510"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:19:32.689515"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:32.692818"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:19:32.692818"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:19:32.694817"], ["name", "test"], ["updated_at", "2015-04-08 09:19:32.694817"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:19:32.713503"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:19:32.808419"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:32.827541"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:19:32.827123"], ["updated_at", "2015-04-08 09:19:32.827541"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 32ms (Views: 1.6ms | ActiveRecord: 4.2ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:19:33', '2015-04-08 09:19:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:33', '2015-04-08 09:19:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:33', '2015-04-08 09:19:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:33', '2015-04-08 09:19:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:33', '2015-04-08 09:19:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:19:33', '2015-04-08 09:19:33', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:19:33.096085"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:33.114733"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:19:33.000000000 Z\n updated_at: 2015-04-08 09:19:33.096085000 Z\n"], ["run_at", "2015-04-08 09:19:43.099553"], ["updated_at", "2015-04-08 09:19:33.114733"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:19:33.367115"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:19:33.874495"]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:33.900114"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:19:33.000000000 Z\n updated_at: 2015-04-08 09:19:33.874495000 Z\n"], ["run_at", "2015-04-08 09:19:43.882391"], ["updated_at", "2015-04-08 09:19:33.900114"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:19:34', '2015-04-08 09:19:34', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd08b00adcb8345dd3bc59e2d6632b0fa' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:19:34.094608"], ["extension", "png"], ["name", "Dummy"], ["token", "d08b00adcb8345dd3bc59e2d6632b0fa"], ["updated_at", "2015-04-08 09:19:34.094608"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:19:34.197820"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:34.216829"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:19:34.216434"], ["updated_at", "2015-04-08 09:19:34.216829"]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 431685987) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:19:34', '2015-04-08 09:19:34', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:19:34', '2015-04-08 09:19:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:19:34', '2015-04-08 09:19:34', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:19:34.642003"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:19:34.646649"], ["name", "test"], ["updated_at", "2015-04-08 09:19:34.646649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:19:34.651353"], ["name", "test"], ["updated_at", "2015-04-08 09:19:34.651353"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:34.652286"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:19:34.652286"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:19:34.653275"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:19:34.653275"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:19:34.662964"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:08', '2015-04-08 09:25:08', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 153115190) Fixture Delete (0.7ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:08', '2015-04-08 09:25:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:08', '2015-04-08 09:25:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:08', '2015-04-08 09:25:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:08', '2015-04-08 09:25:08', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:08', '2015-04-08 09:25:08', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:25:08.867004"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:25:08.880748"], ["name", "test"], ["updated_at", "2015-04-08 09:25:08.880748"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:25:08.886719"], ["name", "test"], ["updated_at", "2015-04-08 09:25:08.886719"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:08.887748"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:25:08.887748"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:08.888658"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:25:08.888658"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:25:08.901052"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:25:09.025327"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:09.081621"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:25:09.081234"], ["updated_at", "2015-04-08 09:25:09.081621"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:09', '2015-04-08 09:25:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:25:09.464238"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:25:09.602402"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:09.618997"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:25:09.618733"], ["updated_at", "2015-04-08 09:25:09.618997"]]  (1.0ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 27ms (Views: 1.4ms | ActiveRecord: 3.1ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:09', '2015-04-08 09:25:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:09', '2015-04-08 09:25:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:09', '2015-04-08 09:25:09', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:25:09.912112"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:09.930720"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:25:09.000000000 Z\n updated_at: 2015-04-08 09:25:09.912112000 Z\n"], ["run_at", "2015-04-08 09:25:19.916030"], ["updated_at", "2015-04-08 09:25:09.930720"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:25:10.196343"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (16.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:25:10.710615"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:10.735989"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:25:09.000000000 Z\n updated_at: 2015-04-08 09:25:10.710615000 Z\n"], ["run_at", "2015-04-08 09:25:20.718974"], ["updated_at", "2015-04-08 09:25:10.735989"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:10', '2015-04-08 09:25:10', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:10', '2015-04-08 09:25:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:10', '2015-04-08 09:25:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:10', '2015-04-08 09:25:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:10', '2015-04-08 09:25:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:10', '2015-04-08 09:25:10', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 1.4ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c16f2fb738e699533d6092e96db7256a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:10.944312"], ["extension", "txt"], ["name", "footest barish"], ["token", "c16f2fb738e699533d6092e96db7256a"], ["updated_at", "2015-04-08 09:25:10.944312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:10.947343"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:25:10.947343"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '28a00454970e7e1619d295824f6b3d48' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:25:10.983208"], ["extension", "png"], ["name", "Dummy"], ["token", "28a00454970e7e1619d295824f6b3d48"], ["updated_at", "2015-04-08 09:25:10.983208"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '79c74730623465fca016a3b52a4667f9' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:11.010405"], ["extension", "txt"], ["name", "Test"], ["token", "79c74730623465fca016a3b52a4667f9"], ["updated_at", "2015-04-08 09:25:11.010405"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b0cc2a4fb6867a503695208df17521ff' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:11.013082"], ["extension", "txt"], ["name", "Test"], ["token", "b0cc2a4fb6867a503695208df17521ff"], ["updated_at", "2015-04-08 09:25:11.013082"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f1c231391fbad3da6c02b255f9e99536' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:11.017551"], ["extension", "txt"], ["name", "Test"], ["token", "f1c231391fbad3da6c02b255f9e99536"], ["updated_at", "2015-04-08 09:25:11.017551"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e3cabb351121e88b05424bbdf79cf73a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:11.020328"], ["extension", "txt"], ["name", "Test"], ["token", "e3cabb351121e88b05424bbdf79cf73a"], ["updated_at", "2015-04-08 09:25:11.020328"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c71783eb3bcf54e3c270c3201b763308' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:11.023996"], ["extension", "txt"], ["name", "Test"], ["token", "c71783eb3bcf54e3c270c3201b763308"], ["updated_at", "2015-04-08 09:25:11.023996"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:25:11.029592"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:25:11.112616"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:11.133504"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:25:11.133130"], ["updated_at", "2015-04-08 09:25:11.133504"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:11', '2015-04-08 09:25:11', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:11', '2015-04-08 09:25:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:11', '2015-04-08 09:25:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:11', '2015-04-08 09:25:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:11', '2015-04-08 09:25:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:11', '2015-04-08 09:25:11', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:11.320541"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:25:11.320541"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:25:11.324410"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:11.328815"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:25:11.328815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:25:11.331224"], ["name", "test"], ["updated_at", "2015-04-08 09:25:11.331224"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:24', '2015-04-08 09:25:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:25:24.407716"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:24.429437"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:25:24.429125"], ["updated_at", "2015-04-08 09:25:24.429437"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:24', '2015-04-08 09:25:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:24', '2015-04-08 09:25:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:24', '2015-04-08 09:25:24', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 22ms (Views: 0.9ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3cda4f5fd6d07b54b204a24e8f22b27c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:24.880088"], ["extension", "txt"], ["name", "footest barish"], ["token", "3cda4f5fd6d07b54b204a24e8f22b27c"], ["updated_at", "2015-04-08 09:25:24.880088"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:24.888554"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:25:24.888554"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:25:25.042567"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:25.062231"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:25:24.000000000 Z\n updated_at: 2015-04-08 09:25:25.042567000 Z\n"], ["run_at", "2015-04-08 09:25:35.046774"], ["updated_at", "2015-04-08 09:25:25.062231"]]  (1.3ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:25:25.299302"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:25:25.817981"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:25.845271"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:25:24.000000000 Z\n updated_at: 2015-04-08 09:25:25.817981000 Z\n"], ["run_at", "2015-04-08 09:25:35.823937"], ["updated_at", "2015-04-08 09:25:25.845271"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:26', '2015-04-08 09:25:26', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 948421225)  (1.5ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:26.028858"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:25:26.028858"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:25:26.032231"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:26.042500"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:25:26.042500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:25:26.044852"], ["name", "test"], ["updated_at", "2015-04-08 09:25:26.044852"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2ae42884a918503a8fd8f7a9f394af0f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:25:26.052001"], ["extension", "png"], ["name", "Dummy"], ["token", "2ae42884a918503a8fd8f7a9f394af0f"], ["updated_at", "2015-04-08 09:25:26.052001"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c3e3f39c0659a7c49a2bc508efed9cb3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:26.088974"], ["extension", "txt"], ["name", "Test"], ["token", "c3e3f39c0659a7c49a2bc508efed9cb3"], ["updated_at", "2015-04-08 09:25:26.088974"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '602621d1d55bb4f39aea1d7016ee369d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:26.092001"], ["extension", "txt"], ["name", "Test"], ["token", "602621d1d55bb4f39aea1d7016ee369d"], ["updated_at", "2015-04-08 09:25:26.092001"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'db98584155f96d8a9b166b08d46f3ef4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:26.096605"], ["extension", "txt"], ["name", "Test"], ["token", "db98584155f96d8a9b166b08d46f3ef4"], ["updated_at", "2015-04-08 09:25:26.096605"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f226bac0afc2888fee6eb0e7bea00400' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:26.098861"], ["extension", "txt"], ["name", "Test"], ["token", "f226bac0afc2888fee6eb0e7bea00400"], ["updated_at", "2015-04-08 09:25:26.098861"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ca54e836cc8ecb28e5eb4204b7679bac' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:25:26.101806"], ["extension", "txt"], ["name", "Test"], ["token", "ca54e836cc8ecb28e5eb4204b7679bac"], ["updated_at", "2015-04-08 09:25:26.101806"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:25:26.107967"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:25:26.208052"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:26.228496"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:25:26.228245"], ["updated_at", "2015-04-08 09:25:26.228496"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:26', '2015-04-08 09:25:26', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 948421225)  (1.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:25:26.414265"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:25:26.509893"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:26.527468"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:25:26.527207"], ["updated_at", "2015-04-08 09:25:26.527468"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 27ms (Views: 1.6ms | ActiveRecord: 3.2ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:25:26', '2015-04-08 09:25:26', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:25:26', '2015-04-08 09:25:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:25:26', '2015-04-08 09:25:26', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:25:26.714428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:25:26.725213"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:25:26.729761"], ["name", "test"], ["updated_at", "2015-04-08 09:25:26.729761"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:25:26.734282"], ["name", "test"], ["updated_at", "2015-04-08 09:25:26.734282"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:26.735140"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:25:26.735140"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:25:26.735913"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:25:26.735913"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:42:16', '2015-04-08 09:42:16', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:16', '2015-04-08 09:42:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:16', '2015-04-08 09:42:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:16', '2015-04-08 09:42:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:16', '2015-04-08 09:42:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:42:16', '2015-04-08 09:42:16', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:42:16.674427"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:16.695342"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:42:16.695039"], ["updated_at", "2015-04-08 09:42:16.695342"]]  (0.8ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:42:17', '2015-04-08 09:42:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:17', '2015-04-08 09:42:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:17', '2015-04-08 09:42:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:17', '2015-04-08 09:42:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:17', '2015-04-08 09:42:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:42:17', '2015-04-08 09:42:17', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:42:17.172995"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:17.193949"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:42:17.000000000 Z\n updated_at: 2015-04-08 09:42:17.172995000 Z\n"], ["run_at", "2015-04-08 09:42:27.179152"], ["updated_at", "2015-04-08 09:42:17.193949"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:42:17.414616"], ["width", 800]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:42:17.885780"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:17.912734"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:42:17.000000000 Z\n updated_at: 2015-04-08 09:42:17.885780000 Z\n"], ["run_at", "2015-04-08 09:42:27.895749"], ["updated_at", "2015-04-08 09:42:17.912734"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:42:18', '2015-04-08 09:42:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.077200"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:42:18.077200"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:42:18.081964"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.094175"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:42:18.094175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:42:18.096827"], ["name", "test"], ["updated_at", "2015-04-08 09:42:18.096827"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:42:18.121642"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:42:18.126547"], ["name", "test"], ["updated_at", "2015-04-08 09:42:18.126547"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:42:18.131775"], ["name", "test"], ["updated_at", "2015-04-08 09:42:18.131775"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.132676"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:42:18.132676"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.133772"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:42:18.133772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2e51b1729bd11b29e62e1de9fe93ba72' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:42:18.147876"], ["extension", "png"], ["name", "Dummy"], ["token", "2e51b1729bd11b29e62e1de9fe93ba72"], ["updated_at", "2015-04-08 09:42:18.147876"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.6ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 18ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 1.0ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.8ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4cbcfe142ab17e4d3b66f817743b1678' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:42:18.218946"], ["extension", "txt"], ["name", "footest barish"], ["token", "4cbcfe142ab17e4d3b66f817743b1678"], ["updated_at", "2015-04-08 09:42:18.218946"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.221137"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:42:18.221137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '76e13c84bb6777dd8b258f6dc67ea069' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:42:18.249841"], ["extension", "txt"], ["name", "Test"], ["token", "76e13c84bb6777dd8b258f6dc67ea069"], ["updated_at", "2015-04-08 09:42:18.249841"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '22ef8d448f695f377a477100719af6c6' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:42:18.252580"], ["extension", "txt"], ["name", "Test"], ["token", "22ef8d448f695f377a477100719af6c6"], ["updated_at", "2015-04-08 09:42:18.252580"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '20ba1cb08a0dc460d47a56dcec367cb5' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:42:18.258256"], ["extension", "txt"], ["name", "Test"], ["token", "20ba1cb08a0dc460d47a56dcec367cb5"], ["updated_at", "2015-04-08 09:42:18.258256"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '61465cf89060a795813912d2c3b8f453' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:42:18.260722"], ["extension", "txt"], ["name", "Test"], ["token", "61465cf89060a795813912d2c3b8f453"], ["updated_at", "2015-04-08 09:42:18.260722"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd5ffa16dab588fc37d954886c62ca473' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:42:18.263660"], ["extension", "txt"], ["name", "Test"], ["token", "d5ffa16dab588fc37d954886c62ca473"], ["updated_at", "2015-04-08 09:42:18.263660"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:42:18.268919"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:42:18.355324"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.371697"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:42:18.371410"], ["updated_at", "2015-04-08 09:42:18.371697"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:42:18', '2015-04-08 09:42:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:42:18.563049"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:42:18.570403"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (1.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:42:18.676710"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:42:18.697585"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:42:18.697206"], ["updated_at", "2015-04-08 09:42:18.697585"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 31ms (Views: 2.1ms | ActiveRecord: 3.6ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:42:18', '2015-04-08 09:42:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:42:18', '2015-04-08 09:42:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:42:18', '2015-04-08 09:42:18', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:17', '2015-04-08 09:43:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:17', '2015-04-08 09:43:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:17', '2015-04-08 09:43:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:17', '2015-04-08 09:43:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:17', '2015-04-08 09:43:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:17', '2015-04-08 09:43:17', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:43:18.068424"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:18.089823"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:43:18.089344"], ["updated_at", "2015-04-08 09:43:18.089823"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:18', '2015-04-08 09:43:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:18', '2015-04-08 09:43:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:18', '2015-04-08 09:43:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:18', '2015-04-08 09:43:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:18', '2015-04-08 09:43:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:18', '2015-04-08 09:43:18', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 21ms (Views: 0.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 0.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '76ebc046fe5f55f90fddc8d7b7ea1b4a' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:43:18.548260"], ["extension", "txt"], ["name", "footest barish"], ["token", "76ebc046fe5f55f90fddc8d7b7ea1b4a"], ["updated_at", "2015-04-08 09:43:18.548260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:18.557906"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:43:18.557906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:43:18.708763"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:18.725290"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:43:18.000000000 Z\n updated_at: 2015-04-08 09:43:18.708763000 Z\n"], ["run_at", "2015-04-08 09:43:28.712783"], ["updated_at", "2015-04-08 09:43:18.725290"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:43:19.005020"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:43:19.519240"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:19.542563"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:43:18.000000000 Z\n updated_at: 2015-04-08 09:43:19.519240000 Z\n"], ["run_at", "2015-04-08 09:43:29.528272"], ["updated_at", "2015-04-08 09:43:19.542563"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:19', '2015-04-08 09:43:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:19', '2015-04-08 09:43:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:19', '2015-04-08 09:43:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:19', '2015-04-08 09:43:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:19', '2015-04-08 09:43:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:19', '2015-04-08 09:43:19', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:19.723179"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:43:19.723179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:43:36.687300"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:36.697846"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:43:36.697846"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:43:36.700287"], ["name", "test"], ["updated_at", "2015-04-08 09:43:36.700287"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:43:36.705780"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:43:36.798910"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:36.814711"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:43:36.814344"], ["updated_at", "2015-04-08 09:43:36.814711"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 25ms (Views: 1.7ms | ActiveRecord: 3.0ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:36', '2015-04-08 09:43:36', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:36', '2015-04-08 09:43:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:36', '2015-04-08 09:43:36', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:36', '2015-04-08 09:43:36', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:36', '2015-04-08 09:43:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:36', '2015-04-08 09:43:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:37', '2015-04-08 09:43:37', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:37', '2015-04-08 09:43:37', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:37', '2015-04-08 09:43:37', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:43:37.009230"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:43:37.019985"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:43:37.025940"], ["name", "test"], ["updated_at", "2015-04-08 09:43:37.025940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:43:37.033377"], ["name", "test"], ["updated_at", "2015-04-08 09:43:37.033377"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:37.034449"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:43:37.034449"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:37.035474"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:43:37.035474"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a1c6b5538f7824e44f9d5a0294b71644' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:43:37.042134"], ["extension", "png"], ["name", "Dummy"], ["token", "a1c6b5538f7824e44f9d5a0294b71644"], ["updated_at", "2015-04-08 09:43:37.042134"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '98046eab9e1f140cac9fa74582e72e81' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:43:37.080033"], ["extension", "txt"], ["name", "Test"], ["token", "98046eab9e1f140cac9fa74582e72e81"], ["updated_at", "2015-04-08 09:43:37.080033"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd36490f83e7919dd3deb1ccb266974ae' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:43:37.083132"], ["extension", "txt"], ["name", "Test"], ["token", "d36490f83e7919dd3deb1ccb266974ae"], ["updated_at", "2015-04-08 09:43:37.083132"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '56b08a14c464bc184a63f3e8b2eb7938' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:43:37.087955"], ["extension", "txt"], ["name", "Test"], ["token", "56b08a14c464bc184a63f3e8b2eb7938"], ["updated_at", "2015-04-08 09:43:37.087955"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6f1846501f317de99e12c400df7850f2' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:43:37.090824"], ["extension", "txt"], ["name", "Test"], ["token", "6f1846501f317de99e12c400df7850f2"], ["updated_at", "2015-04-08 09:43:37.090824"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '54d43f97b6d4589d6333b0ecabc431c9' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:43:37.095178"], ["extension", "txt"], ["name", "Test"], ["token", "54d43f97b6d4589d6333b0ecabc431c9"], ["updated_at", "2015-04-08 09:43:37.095178"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:43:37.101339"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:43:37.193071"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:37.211804"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:43:37.211504"], ["updated_at", "2015-04-08 09:43:37.211804"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:55', '2015-04-08 09:43:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:43:55.296249"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.3ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:43:55.397678"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:55.418048"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:43:55.417741"], ["updated_at", "2015-04-08 09:43:55.418048"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 31ms (Views: 1.7ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:55', '2015-04-08 09:43:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:55', '2015-04-08 09:43:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:55', '2015-04-08 09:43:55', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:43:55.678268"]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:55.703597"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:43:55.703197"], ["updated_at", "2015-04-08 09:43:55.703597"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 591498715) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:43:56', '2015-04-08 09:43:56', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:56', '2015-04-08 09:43:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:56', '2015-04-08 09:43:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:56', '2015-04-08 09:43:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:43:56', '2015-04-08 09:43:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:43:56', '2015-04-08 09:43:56', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:43:56.089226"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:43:56.089226"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:44:29.205880"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:29.215570"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:44:29.215570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:44:29.218010"], ["name", "test"], ["updated_at", "2015-04-08 09:44:29.218010"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:44:29.244813"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6f00244facca8904d3796ca06dd06e1e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:44:29.255755"], ["extension", "png"], ["name", "Dummy"], ["token", "6f00244facca8904d3796ca06dd06e1e"], ["updated_at", "2015-04-08 09:44:29.255755"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '378f148276d65aeacd8bd58657da6767' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:44:29.282110"], ["extension", "txt"], ["name", "Test"], ["token", "378f148276d65aeacd8bd58657da6767"], ["updated_at", "2015-04-08 09:44:29.282110"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a3b6122a69e21d7f49d80b1ec3ab3e0b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:44:29.284840"], ["extension", "txt"], ["name", "Test"], ["token", "a3b6122a69e21d7f49d80b1ec3ab3e0b"], ["updated_at", "2015-04-08 09:44:29.284840"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '832176d4a8dcc3013423ae238b8725b2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:44:29.289137"], ["extension", "txt"], ["name", "Test"], ["token", "832176d4a8dcc3013423ae238b8725b2"], ["updated_at", "2015-04-08 09:44:29.289137"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8dd7030d2ccf0f509911940c3f82d136' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:44:29.291416"], ["extension", "txt"], ["name", "Test"], ["token", "8dd7030d2ccf0f509911940c3f82d136"], ["updated_at", "2015-04-08 09:44:29.291416"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '97b8f27c2d1ae2a7d2151145bc366782' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:44:29.294821"], ["extension", "txt"], ["name", "Test"], ["token", "97b8f27c2d1ae2a7d2151145bc366782"], ["updated_at", "2015-04-08 09:44:29.294821"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:44:29.300806"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:44:29.384852"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:29.409292"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:44:29.409010"], ["updated_at", "2015-04-08 09:44:29.409292"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:44:29', '2015-04-08 09:44:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:29', '2015-04-08 09:44:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:29', '2015-04-08 09:44:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:29', '2015-04-08 09:44:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:29', '2015-04-08 09:44:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:44:29', '2015-04-08 09:44:29', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 21ms (Views: 1.1ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8562f36ec2613a092c64bd7cf12c9afd' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:44:29.629999"], ["extension", "txt"], ["name", "footest barish"], ["token", "8562f36ec2613a092c64bd7cf12c9afd"], ["updated_at", "2015-04-08 09:44:29.629999"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:29.637503"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:44:29.637503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.5ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:44:29.668332"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:44:29.672732"], ["name", "test"], ["updated_at", "2015-04-08 09:44:29.672732"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:44:29.677566"], ["name", "test"], ["updated_at", "2015-04-08 09:44:29.677566"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:29.678617"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:44:29.678617"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:29.679403"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:44:29.679403"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:44:29.770410"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:29.790657"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:44:29.000000000 Z\n updated_at: 2015-04-08 09:44:29.770410000 Z\n"], ["run_at", "2015-04-08 09:44:39.773957"], ["updated_at", "2015-04-08 09:44:29.790657"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:44:30.038258"], ["width", 800]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:44:30.521906"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:30.548664"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:44:29.000000000 Z\n updated_at: 2015-04-08 09:44:30.521906000 Z\n"], ["run_at", "2015-04-08 09:44:40.529522"], ["updated_at", "2015-04-08 09:44:30.548664"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:44:51', '2015-04-08 09:44:51', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:51', '2015-04-08 09:44:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:51', '2015-04-08 09:44:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:51', '2015-04-08 09:44:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:44:51', '2015-04-08 09:44:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:44:51', '2015-04-08 09:44:51', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:44:51.052960"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:44:51.052960"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:45:09.016318"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.042537"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:45:09.042537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:45:09.045398"], ["name", "test"], ["updated_at", "2015-04-08 09:45:09.045398"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:45:09.070964"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:45:09.077423"], ["name", "test"], ["updated_at", "2015-04-08 09:45:09.077423"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:45:09.082049"], ["name", "test"], ["updated_at", "2015-04-08 09:45:09.082049"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.082852"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:45:09.082852"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.083768"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:45:09.083768"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:45:09.091616"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b417d8b44843c7dc43787c81ee00be52' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:45:09.102059"], ["extension", "png"], ["name", "Dummy"], ["token", "b417d8b44843c7dc43787c81ee00be52"], ["updated_at", "2015-04-08 09:45:09.102059"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:45:09.129829"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:45:09.217376"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.234061"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:45:09.233805"], ["updated_at", "2015-04-08 09:45:09.234061"]]  (0.9ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 28ms (Views: 2.7ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:09', '2015-04-08 09:45:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '802970bb4f4758ba5f7b38efa8f2492e' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:09.446277"], ["extension", "txt"], ["name", "Test"], ["token", "802970bb4f4758ba5f7b38efa8f2492e"], ["updated_at", "2015-04-08 09:45:09.446277"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c5cc5e89977725472b9dc3415686a491' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:09.449072"], ["extension", "txt"], ["name", "Test"], ["token", "c5cc5e89977725472b9dc3415686a491"], ["updated_at", "2015-04-08 09:45:09.449072"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9ad51eccd961af9372a80f536ed60993' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:09.453307"], ["extension", "txt"], ["name", "Test"], ["token", "9ad51eccd961af9372a80f536ed60993"], ["updated_at", "2015-04-08 09:45:09.453307"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aff3928e6d1c1ba80e8fd6fca377174a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:09.455596"], ["extension", "txt"], ["name", "Test"], ["token", "aff3928e6d1c1ba80e8fd6fca377174a"], ["updated_at", "2015-04-08 09:45:09.455596"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dd4743cbd957f214574a9edb0b2fcd42' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:09.459634"], ["extension", "txt"], ["name", "Test"], ["token", "dd4743cbd957f214574a9edb0b2fcd42"], ["updated_at", "2015-04-08 09:45:09.459634"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:45:09.467245"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:45:09.549389"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.576191"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:45:09.575796"], ["updated_at", "2015-04-08 09:45:09.576191"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:09', '2015-04-08 09:45:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:09', '2015-04-08 09:45:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:09', '2015-04-08 09:45:09', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 13ms (Views: 1.2ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '10bb6d03ae95084ddbd454a59723ac4d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:09.779641"], ["extension", "txt"], ["name", "footest barish"], ["token", "10bb6d03ae95084ddbd454a59723ac4d"], ["updated_at", "2015-04-08 09:45:09.779641"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.782157"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:45:09.782157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:45:09.883306"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:09.905337"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:45:09.000000000 Z\n updated_at: 2015-04-08 09:45:09.883306000 Z\n"], ["run_at", "2015-04-08 09:45:19.886369"], ["updated_at", "2015-04-08 09:45:09.905337"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:45:10.139565"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:45:10.621367"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:10.650305"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:45:09.000000000 Z\n updated_at: 2015-04-08 09:45:10.621367000 Z\n"], ["run_at", "2015-04-08 09:45:20.629044"], ["updated_at", "2015-04-08 09:45:10.650305"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:10', '2015-04-08 09:45:10', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:10', '2015-04-08 09:45:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:10', '2015-04-08 09:45:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:10', '2015-04-08 09:45:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:10', '2015-04-08 09:45:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:10', '2015-04-08 09:45:10', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:45:10.906526"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:10.925034"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:45:10.924764"], ["updated_at", "2015-04-08 09:45:10.925034"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:49', '2015-04-08 09:45:49', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:49', '2015-04-08 09:45:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:49', '2015-04-08 09:45:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:49', '2015-04-08 09:45:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:49', '2015-04-08 09:45:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:49', '2015-04-08 09:45:49', 948421225)  (4.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:49.829406"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:45:49.829406"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:45:49.832379"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:49.841698"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:45:49.841698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:45:49.844293"], ["name", "test"], ["updated_at", "2015-04-08 09:45:49.844293"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:45:49.851055"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:45:49.948739"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:49.971779"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:45:49.971491"], ["updated_at", "2015-04-08 09:45:49.971779"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 63ms (Views: 31.6ms | ActiveRecord: 2.9ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:50', '2015-04-08 09:45:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2b90c890b8795dc22d605b2f62fa4b5d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:45:50.174982"], ["extension", "png"], ["name", "Dummy"], ["token", "2b90c890b8795dc22d605b2f62fa4b5d"], ["updated_at", "2015-04-08 09:45:50.174982"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.4ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:45:50.234549"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:45:50.239974"], ["name", "test"], ["updated_at", "2015-04-08 09:45:50.239974"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:45:50.244933"], ["name", "test"], ["updated_at", "2015-04-08 09:45:50.244933"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:50.245738"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:45:50.245738"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:50.246719"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:45:50.246719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:45:50.256275"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '61e07a09731e0954fd9b694c20181f33' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:50.261885"], ["extension", "txt"], ["name", "Test"], ["token", "61e07a09731e0954fd9b694c20181f33"], ["updated_at", "2015-04-08 09:45:50.261885"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b1b8a9fbc6798313bb29138338b04fb7' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:50.264440"], ["extension", "txt"], ["name", "Test"], ["token", "b1b8a9fbc6798313bb29138338b04fb7"], ["updated_at", "2015-04-08 09:45:50.264440"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ecbca6f152fff5fa2902070786f1022f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:50.268947"], ["extension", "txt"], ["name", "Test"], ["token", "ecbca6f152fff5fa2902070786f1022f"], ["updated_at", "2015-04-08 09:45:50.268947"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bbdc145c73cca281da85332c846cca17' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:50.271816"], ["extension", "txt"], ["name", "Test"], ["token", "bbdc145c73cca281da85332c846cca17"], ["updated_at", "2015-04-08 09:45:50.271816"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ba73a0db20317716646afbd19a83a008' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:50.275327"], ["extension", "txt"], ["name", "Test"], ["token", "ba73a0db20317716646afbd19a83a008"], ["updated_at", "2015-04-08 09:45:50.275327"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:45:50.281139"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:45:50.363988"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:50.385698"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:45:50.385330"], ["updated_at", "2015-04-08 09:45:50.385698"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:50', '2015-04-08 09:45:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:50', '2015-04-08 09:45:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:50', '2015-04-08 09:45:50', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 10ms (Views: 1.1ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '609295a870401c0e6be487ff725d8ead' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:45:50.592195"], ["extension", "txt"], ["name", "footest barish"], ["token", "609295a870401c0e6be487ff725d8ead"], ["updated_at", "2015-04-08 09:45:50.592195"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:50.594698"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:45:50.594698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:45:50.697642"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:50.719686"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:45:50.719385"], ["updated_at", "2015-04-08 09:45:50.719686"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:45:51', '2015-04-08 09:45:51', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:51', '2015-04-08 09:45:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:51', '2015-04-08 09:45:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:51', '2015-04-08 09:45:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:45:51', '2015-04-08 09:45:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:45:51', '2015-04-08 09:45:51', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:45:51.215291"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:51.233748"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:45:51.000000000 Z\n updated_at: 2015-04-08 09:45:51.215291000 Z\n"], ["run_at", "2015-04-08 09:46:01.218476"], ["updated_at", "2015-04-08 09:45:51.233748"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:45:51.475893"], ["width", 800]]  (0.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:45:51.983379"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:45:52.002251"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:45:51.000000000 Z\n updated_at: 2015-04-08 09:45:51.983379000 Z\n"], ["run_at", "2015-04-08 09:46:01.986449"], ["updated_at", "2015-04-08 09:45:52.002251"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:18', '2015-04-08 09:47:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:18', '2015-04-08 09:47:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:18', '2015-04-08 09:47:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:18', '2015-04-08 09:47:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:18', '2015-04-08 09:47:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:18', '2015-04-08 09:47:18', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:47:18.634569"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:18.657813"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:47:18.000000000 Z\n updated_at: 2015-04-08 09:47:18.634569000 Z\n"], ["run_at", "2015-04-08 09:47:28.640991"], ["updated_at", "2015-04-08 09:47:18.657813"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:47:18.885188"], ["width", 800]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:47:19.342016"]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:19.368644"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:47:18.000000000 Z\n updated_at: 2015-04-08 09:47:19.342016000 Z\n"], ["run_at", "2015-04-08 09:47:29.351470"], ["updated_at", "2015-04-08 09:47:19.368644"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:19', '2015-04-08 09:47:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 1.3ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cd731bbfa3f46cbd7eedaaaae6735f9f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:19.590471"], ["extension", "txt"], ["name", "footest barish"], ["token", "cd731bbfa3f46cbd7eedaaaae6735f9f"], ["updated_at", "2015-04-08 09:47:19.590471"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:19.599025"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:47:19.599025"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:47:19.627661"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:47:19.651431"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:47:19.660759"], ["name", "test"], ["updated_at", "2015-04-08 09:47:19.660759"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:47:19.666731"], ["name", "test"], ["updated_at", "2015-04-08 09:47:19.666731"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:19.668226"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:47:19.668226"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:19.669613"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:47:19.669613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dd5fa8b2e8f82ceeca80aa6e1d7cbfd1' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:19.674613"], ["extension", "txt"], ["name", "Test"], ["token", "dd5fa8b2e8f82ceeca80aa6e1d7cbfd1"], ["updated_at", "2015-04-08 09:47:19.674613"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '14ff2168f33b27df60a6f96ce6c6e15b' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:19.677849"], ["extension", "txt"], ["name", "Test"], ["token", "14ff2168f33b27df60a6f96ce6c6e15b"], ["updated_at", "2015-04-08 09:47:19.677849"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.6ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2a01159bfe6798631d65bfa897aec000' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:19.683423"], ["extension", "txt"], ["name", "Test"], ["token", "2a01159bfe6798631d65bfa897aec000"], ["updated_at", "2015-04-08 09:47:19.683423"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd6303a34b519f31383b2ef754694c3cd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:19.686128"], ["extension", "txt"], ["name", "Test"], ["token", "d6303a34b519f31383b2ef754694c3cd"], ["updated_at", "2015-04-08 09:47:19.686128"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '824fc2575c3b846638c080642472cedd' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:19.689369"], ["extension", "txt"], ["name", "Test"], ["token", "824fc2575c3b846638c080642472cedd"], ["updated_at", "2015-04-08 09:47:19.689369"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:47:19.696802"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:47:19.781012"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:19.802364"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:47:19.802083"], ["updated_at", "2015-04-08 09:47:19.802364"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:19', '2015-04-08 09:47:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:19', '2015-04-08 09:47:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:19', '2015-04-08 09:47:19', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fda70537426ddf3538076595845b185a' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:47:19.983270"], ["extension", "png"], ["name", "Dummy"], ["token", "fda70537426ddf3538076595845b185a"], ["updated_at", "2015-04-08 09:47:19.983270"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:47:20.100071"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:20.119209"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:47:20.118918"], ["updated_at", "2015-04-08 09:47:20.119209"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:20', '2015-04-08 09:47:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:20.527914"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:47:20.527914"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:47:20.532424"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:20.535791"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:47:20.535791"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:47:20.537752"], ["name", "test"], ["updated_at", "2015-04-08 09:47:20.537752"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:47:20.548499"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:47:20.644334"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:20.663905"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:47:20.663500"], ["updated_at", "2015-04-08 09:47:20.663905"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 31ms (Views: 3.2ms | ActiveRecord: 3.8ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:20', '2015-04-08 09:47:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:20', '2015-04-08 09:47:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:20', '2015-04-08 09:47:20', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:38', '2015-04-08 09:47:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:38', '2015-04-08 09:47:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:38', '2015-04-08 09:47:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:38', '2015-04-08 09:47:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:38', '2015-04-08 09:47:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:38', '2015-04-08 09:47:38', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'fdbaef368a7e9c27774ec2328f3ec85b' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:47:38.042226"], ["extension", "png"], ["name", "Dummy"], ["token", "fdbaef368a7e9c27774ec2328f3ec85b"], ["updated_at", "2015-04-08 09:47:38.042226"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 2.0ms | ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 19ms (Views: 0.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9887c702b4e9bdbe6db9df55c06b13f8' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:38.127857"], ["extension", "txt"], ["name", "footest barish"], ["token", "9887c702b4e9bdbe6db9df55c06b13f8"], ["updated_at", "2015-04-08 09:47:38.127857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:38.136930"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:47:38.136930"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 13ms (Views: 0.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:47:38.242915"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:38.260524"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:47:38.000000000 Z\n updated_at: 2015-04-08 09:47:38.242915000 Z\n"], ["run_at", "2015-04-08 09:47:48.248120"], ["updated_at", "2015-04-08 09:47:38.260524"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:47:38.515057"], ["width", 800]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:47:39.015858"]]  (5.3ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:39.044177"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:47:38.000000000 Z\n updated_at: 2015-04-08 09:47:39.015858000 Z\n"], ["run_at", "2015-04-08 09:47:49.025760"], ["updated_at", "2015-04-08 09:47:39.044177"]]  (1.1ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:39', '2015-04-08 09:47:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '6f5bd5c8f3c532a7eab8e38f91c5cfa0' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:39.225695"], ["extension", "txt"], ["name", "Test"], ["token", "6f5bd5c8f3c532a7eab8e38f91c5cfa0"], ["updated_at", "2015-04-08 09:47:39.225695"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a7c0357eed637b986fbd2dd57511ae37' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:39.229036"], ["extension", "txt"], ["name", "Test"], ["token", "a7c0357eed637b986fbd2dd57511ae37"], ["updated_at", "2015-04-08 09:47:39.229036"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ca96e1531379fa6b756ba0d2d553dbc3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:39.233758"], ["extension", "txt"], ["name", "Test"], ["token", "ca96e1531379fa6b756ba0d2d553dbc3"], ["updated_at", "2015-04-08 09:47:39.233758"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a89cc8c9a3b30d71631134fc22e30b56' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:39.236322"], ["extension", "txt"], ["name", "Test"], ["token", "a89cc8c9a3b30d71631134fc22e30b56"], ["updated_at", "2015-04-08 09:47:39.236322"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '62c5757a18486c06ac7a1ef715f8817f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:47:39.239698"], ["extension", "txt"], ["name", "Test"], ["token", "62c5757a18486c06ac7a1ef715f8817f"], ["updated_at", "2015-04-08 09:47:39.239698"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:47:39.245821"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:47:39.326824"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:39.344592"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:47:39.344202"], ["updated_at", "2015-04-08 09:47:39.344592"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:39', '2015-04-08 09:47:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:47:39.544073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:47:39.550488"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:47:39.640402"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:39.663671"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:47:39.663330"], ["updated_at", "2015-04-08 09:47:39.663671"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 35ms (Views: 2.3ms | ActiveRecord: 3.2ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:39', '2015-04-08 09:47:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:39', '2015-04-08 09:47:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:39', '2015-04-08 09:47:39', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:47:39.932650"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:39.949728"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:47:39.949440"], ["updated_at", "2015-04-08 09:47:39.949728"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:47:40', '2015-04-08 09:47:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:40', '2015-04-08 09:47:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:40', '2015-04-08 09:47:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:40', '2015-04-08 09:47:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:47:40', '2015-04-08 09:47:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:47:40', '2015-04-08 09:47:40', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:47:40.378528"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:47:40.383655"], ["name", "test"], ["updated_at", "2015-04-08 09:47:40.383655"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:47:40.388950"], ["name", "test"], ["updated_at", "2015-04-08 09:47:40.388950"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:40.390050"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:47:40.390050"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:40.391061"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:47:40.391061"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:40.399227"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:47:40.399227"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:47:40.403019"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:47:40.406271"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:47:40.406271"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:47:40.408325"], ["name", "test"], ["updated_at", "2015-04-08 09:47:40.408325"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:17', '2015-04-08 09:48:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:17', '2015-04-08 09:48:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:17', '2015-04-08 09:48:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:17', '2015-04-08 09:48:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:17', '2015-04-08 09:48:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:17', '2015-04-08 09:48:17', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:48:17.843576"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:17.867212"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:48:17.000000000 Z\n updated_at: 2015-04-08 09:48:17.843576000 Z\n"], ["run_at", "2015-04-08 09:48:27.850220"], ["updated_at", "2015-04-08 09:48:17.867212"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:48:18.103397"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:48:18.554745"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:18.582627"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:48:17.000000000 Z\n updated_at: 2015-04-08 09:48:18.554745000 Z\n"], ["run_at", "2015-04-08 09:48:28.564947"], ["updated_at", "2015-04-08 09:48:18.582627"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:18', '2015-04-08 09:48:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:18', '2015-04-08 09:48:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:18', '2015-04-08 09:48:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:18', '2015-04-08 09:48:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:18', '2015-04-08 09:48:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:18', '2015-04-08 09:48:18', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 2.0ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '06258dc47b1784767a2b31ab74bb0a63' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:18.788682"], ["extension", "txt"], ["name", "footest barish"], ["token", "06258dc47b1784767a2b31ab74bb0a63"], ["updated_at", "2015-04-08 09:48:18.788682"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:18.796666"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:48:18.796666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 0.7ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e9ae225c86901fbceaabada1227cd0bb' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:48:18.825228"], ["extension", "png"], ["name", "Dummy"], ["token", "e9ae225c86901fbceaabada1227cd0bb"], ["updated_at", "2015-04-08 09:48:18.825228"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:48:18.881461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b869195203e86b38f271375d2d634e62' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:18.895899"], ["extension", "txt"], ["name", "Test"], ["token", "b869195203e86b38f271375d2d634e62"], ["updated_at", "2015-04-08 09:48:18.895899"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '36ff3647f12f71b419d80201b46ef67c' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:18.899572"], ["extension", "txt"], ["name", "Test"], ["token", "36ff3647f12f71b419d80201b46ef67c"], ["updated_at", "2015-04-08 09:48:18.899572"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '59f7ed67f65d4115ed0c4865a6861bf2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:18.906496"], ["extension", "txt"], ["name", "Test"], ["token", "59f7ed67f65d4115ed0c4865a6861bf2"], ["updated_at", "2015-04-08 09:48:18.906496"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '95c08de4d80b2ec2cf877d1147bd40e8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:18.909010"], ["extension", "txt"], ["name", "Test"], ["token", "95c08de4d80b2ec2cf877d1147bd40e8"], ["updated_at", "2015-04-08 09:48:18.909010"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2f9c199b7d15a772becbf884743a407e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:18.911969"], ["extension", "txt"], ["name", "Test"], ["token", "2f9c199b7d15a772becbf884743a407e"], ["updated_at", "2015-04-08 09:48:18.911969"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:48:18.917371"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:19.001635"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.017983"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:19.017724"], ["updated_at", "2015-04-08 09:48:19.017983"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:19', '2015-04-08 09:48:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.208597"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:48:19.208597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:48:19.212115"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.215316"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:48:19.215316"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:19.217366"], ["name", "test"], ["updated_at", "2015-04-08 09:48:19.217366"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:48:19.238025"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:19.242860"], ["name", "test"], ["updated_at", "2015-04-08 09:48:19.242860"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:19.248835"], ["name", "test"], ["updated_at", "2015-04-08 09:48:19.248835"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.250247"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:48:19.250247"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.251547"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:48:19.251547"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:48:19.257843"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:19.347476"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.369358"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:19.369070"], ["updated_at", "2015-04-08 09:48:19.369358"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 31ms (Views: 1.8ms | ActiveRecord: 3.0ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:19', '2015-04-08 09:48:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:19', '2015-04-08 09:48:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:19', '2015-04-08 09:48:19', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:19.628004"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:19.648623"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:19.648268"], ["updated_at", "2015-04-08 09:48:19.648623"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:31', '2015-04-08 09:48:31', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:31', '2015-04-08 09:48:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:31', '2015-04-08 09:48:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:31', '2015-04-08 09:48:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:31', '2015-04-08 09:48:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:31', '2015-04-08 09:48:31', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:48:31.785566"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:31.804838"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:48:31.000000000 Z\n updated_at: 2015-04-08 09:48:31.785566000 Z\n"], ["run_at", "2015-04-08 09:48:41.790502"], ["updated_at", "2015-04-08 09:48:31.804838"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:48:32.019455"], ["width", 800]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:48:32.493217"]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:32.517552"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:48:31.000000000 Z\n updated_at: 2015-04-08 09:48:32.493217000 Z\n"], ["run_at", "2015-04-08 09:48:42.502590"], ["updated_at", "2015-04-08 09:48:32.517552"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:32', '2015-04-08 09:48:32', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:32', '2015-04-08 09:48:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:32', '2015-04-08 09:48:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:32', '2015-04-08 09:48:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:32', '2015-04-08 09:48:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:32', '2015-04-08 09:48:32', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:48:32.700597"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:32.713411"], ["name", "test"], ["updated_at", "2015-04-08 09:48:32.713411"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:32.719112"], ["name", "test"], ["updated_at", "2015-04-08 09:48:32.719112"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:32.720155"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:48:32.720155"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:32.721076"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:48:32.721076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:48:32.733538"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:48:32.743426"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:32.877562"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:32.893107"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:32.892757"], ["updated_at", "2015-04-08 09:48:32.893107"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 25ms (Views: 1.3ms | ActiveRecord: 2.8ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:33', '2015-04-08 09:48:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:33.197801"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:33.214367"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:33.213986"], ["updated_at", "2015-04-08 09:48:33.214367"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:33', '2015-04-08 09:48:33', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:33', '2015-04-08 09:48:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:33', '2015-04-08 09:48:33', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:33.654896"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:48:33.654896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:48:33.659218"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:33.663042"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:48:33.663042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:33.665410"], ["name", "test"], ["updated_at", "2015-04-08 09:48:33.665410"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8eeb69c7ace07cf194e9abf733392297' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:48:33.689489"], ["extension", "png"], ["name", "Dummy"], ["token", "8eeb69c7ace07cf194e9abf733392297"], ["updated_at", "2015-04-08 09:48:33.689489"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '223e17560540ecf6c276be1a908f3f38' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:33.717924"], ["extension", "txt"], ["name", "Test"], ["token", "223e17560540ecf6c276be1a908f3f38"], ["updated_at", "2015-04-08 09:48:33.717924"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '166cba425109ad99ba8ee334b60bd245' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:33.720786"], ["extension", "txt"], ["name", "Test"], ["token", "166cba425109ad99ba8ee334b60bd245"], ["updated_at", "2015-04-08 09:48:33.720786"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '50c782d45cc69d6fd27874c1b9fae56d' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:33.725848"], ["extension", "txt"], ["name", "Test"], ["token", "50c782d45cc69d6fd27874c1b9fae56d"], ["updated_at", "2015-04-08 09:48:33.725848"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7e053341ad16649eb4f518395b1415b0' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:33.729253"], ["extension", "txt"], ["name", "Test"], ["token", "7e053341ad16649eb4f518395b1415b0"], ["updated_at", "2015-04-08 09:48:33.729253"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f10c373a455218f7e54fa0ffce6be9d6' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:33.732778"], ["extension", "txt"], ["name", "Test"], ["token", "f10c373a455218f7e54fa0ffce6be9d6"], ["updated_at", "2015-04-08 09:48:33.732778"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:48:33.738525"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:33.824755"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:33.839917"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:33.839632"], ["updated_at", "2015-04-08 09:48:33.839917"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:34', '2015-04-08 09:48:34', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:34', '2015-04-08 09:48:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:34', '2015-04-08 09:48:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:34', '2015-04-08 09:48:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:34', '2015-04-08 09:48:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:34', '2015-04-08 09:48:34', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 9ms (Views: 1.0ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'be1a83b30cdee819fc827e4c7a9ee153' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:34.046592"], ["extension", "txt"], ["name", "footest barish"], ["token", "be1a83b30cdee819fc827e4c7a9ee153"], ["updated_at", "2015-04-08 09:48:34.046592"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:34.049300"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:48:34.049300"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:52', '2015-04-08 09:48:52', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:52', '2015-04-08 09:48:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:52', '2015-04-08 09:48:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:52', '2015-04-08 09:48:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:52', '2015-04-08 09:48:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:52', '2015-04-08 09:48:52', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:48:52.637692"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:52.661405"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 09:48:52.000000000 Z\n updated_at: 2015-04-08 09:48:52.637692000 Z\n"], ["run_at", "2015-04-08 09:49:02.642893"], ["updated_at", "2015-04-08 09:48:52.661405"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 09:48:52.899533"], ["width", 800]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 09:48:53.353289"]]  (5.3ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:53.382776"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 09:48:52.000000000 Z\n updated_at: 2015-04-08 09:48:53.353289000 Z\n"], ["run_at", "2015-04-08 09:49:03.362987"], ["updated_at", "2015-04-08 09:48:53.382776"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:53', '2015-04-08 09:48:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5ac5f1d1d9263790cb1ed888bd1f6da3' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:53.550578"], ["extension", "txt"], ["name", "Test"], ["token", "5ac5f1d1d9263790cb1ed888bd1f6da3"], ["updated_at", "2015-04-08 09:48:53.550578"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8c2c3cba0c5b97b0cc4e08495fef6ea5' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:53.555054"], ["extension", "txt"], ["name", "Test"], ["token", "8c2c3cba0c5b97b0cc4e08495fef6ea5"], ["updated_at", "2015-04-08 09:48:53.555054"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9c4b3cd72ded0004abe740a11b7b1cd3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:53.560334"], ["extension", "txt"], ["name", "Test"], ["token", "9c4b3cd72ded0004abe740a11b7b1cd3"], ["updated_at", "2015-04-08 09:48:53.560334"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5d01eee35ca86b686a18bb2cee1ace7d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:53.562997"], ["extension", "txt"], ["name", "Test"], ["token", "5d01eee35ca86b686a18bb2cee1ace7d"], ["updated_at", "2015-04-08 09:48:53.562997"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '33594c83b0cdb7edb0e84a1722ef7904' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:53.567249"], ["extension", "txt"], ["name", "Test"], ["token", "33594c83b0cdb7edb0e84a1722ef7904"], ["updated_at", "2015-04-08 09:48:53.567249"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:48:53.580149"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:53.675398"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:53.696568"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:53.696223"], ["updated_at", "2015-04-08 09:48:53.696568"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:53', '2015-04-08 09:48:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:53', '2015-04-08 09:48:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:53', '2015-04-08 09:48:53', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 25ms (Views: 1.5ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '73d475f7658dac49ef5f55dc34f7e9e3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 09:48:53.893890"], ["extension", "txt"], ["name", "footest barish"], ["token", "73d475f7658dac49ef5f55dc34f7e9e3"], ["updated_at", "2015-04-08 09:48:53.893890"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:53.901961"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 09:48:53.901961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:54.036944"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:54.053484"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:54.053215"], ["updated_at", "2015-04-08 09:48:54.053484"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:54', '2015-04-08 09:48:54', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8dc8f9027d8aef06f0bcac5ad690e9a7' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 09:48:54.498392"], ["extension", "png"], ["name", "Dummy"], ["token", "8dc8f9027d8aef06f0bcac5ad690e9a7"], ["updated_at", "2015-04-08 09:48:54.498392"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:54.528200"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 09:48:54.528200"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 09:48:54.532183"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:54.535604"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:48:54.535604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:54.537962"], ["name", "test"], ["updated_at", "2015-04-08 09:48:54.537962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 09:48:54.543849"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 09:48:54.645784"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:54.662099"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 09:48:54.661634"], ["updated_at", "2015-04-08 09:48:54.662099"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 25ms (Views: 1.6ms | ActiveRecord: 2.8ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 09:48:54', '2015-04-08 09:48:54', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 09:48:54', '2015-04-08 09:48:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 09:48:54', '2015-04-08 09:48:54', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 09:48:54.871551"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 09:48:54.882421"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:54.887612"], ["name", "test"], ["updated_at", "2015-04-08 09:48:54.887612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 09:48:54.892282"], ["name", "test"], ["updated_at", "2015-04-08 09:48:54.892282"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:54.893157"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 09:48:54.893157"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 09:48:54.893940"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 09:48:54.893940"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:04:11', '2015-04-08 10:04:11', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:11', '2015-04-08 10:04:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:11', '2015-04-08 10:04:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:11', '2015-04-08 10:04:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:11', '2015-04-08 10:04:11', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:04:11', '2015-04-08 10:04:11', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 10:04:11.410442"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:04:11.422145"], ["name", "test"], ["updated_at", "2015-04-08 10:04:11.422145"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:04:11.427231"], ["name", "test"], ["updated_at", "2015-04-08 10:04:11.427231"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:11.429180"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:04:11.429180"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:11.430382"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 10:04:11.430382"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:04:11.542856"]]  (0.6ms) commit transaction  (0.3ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:11.594922"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 10:04:11.000000000 Z\n updated_at: 2015-04-08 10:04:11.542856000 Z\n"], ["run_at", "2015-04-08 10:04:21.552787"], ["updated_at", "2015-04-08 10:04:11.594922"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 10:04:11.827490"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:04:12.273052"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:12.297294"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 10:04:11.000000000 Z\n updated_at: 2015-04-08 10:04:12.273052000 Z\n"], ["run_at", "2015-04-08 10:04:22.276593"], ["updated_at", "2015-04-08 10:04:12.297294"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:04:12', '2015-04-08 10:04:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:04:12.530676"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:12.575547"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:04:12.575297"], ["updated_at", "2015-04-08 10:04:12.575547"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:04:12', '2015-04-08 10:04:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:12', '2015-04-08 10:04:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:04:12', '2015-04-08 10:04:12', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '546d212bb55713e45597ca46788ef0e1' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 10:04:12.962516"], ["extension", "png"], ["name", "Dummy"], ["token", "546d212bb55713e45597ca46788ef0e1"], ["updated_at", "2015-04-08 10:04:12.962516"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:04:13.010131"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:04:13.096039"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:13.112919"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:04:13.112645"], ["updated_at", "2015-04-08 10:04:13.112919"]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) commit transaction Completed 500 Internal Server Error in 25ms  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:04:13', '2015-04-08 10:04:13', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:13.528256"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 10:04:13.528256"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 10:04:13.531904"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:13.535127"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:04:13.535127"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:04:13.537134"], ["name", "test"], ["updated_at", "2015-04-08 10:04:13.537134"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 10ms (Views: 0.7ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '53c27e81cf3bee17bba0bf5b778154b6' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:04:13.578522"], ["extension", "txt"], ["name", "footest barish"], ["token", "53c27e81cf3bee17bba0bf5b778154b6"], ["updated_at", "2015-04-08 10:04:13.578522"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:13.581283"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 10:04:13.581283"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4206e5a5f509732c62d826c67725487d' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:04:13.613317"], ["extension", "txt"], ["name", "Test"], ["token", "4206e5a5f509732c62d826c67725487d"], ["updated_at", "2015-04-08 10:04:13.613317"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4f9b701e4f1a96634dd9b7ff0d6d2504' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:04:13.616529"], ["extension", "txt"], ["name", "Test"], ["token", "4f9b701e4f1a96634dd9b7ff0d6d2504"], ["updated_at", "2015-04-08 10:04:13.616529"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'eae9887c284e5d5ecd67cf1b6f509baf' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:04:13.622435"], ["extension", "txt"], ["name", "Test"], ["token", "eae9887c284e5d5ecd67cf1b6f509baf"], ["updated_at", "2015-04-08 10:04:13.622435"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e689accc1eef3f9f1807e66e28ae3a7b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:04:13.625523"], ["extension", "txt"], ["name", "Test"], ["token", "e689accc1eef3f9f1807e66e28ae3a7b"], ["updated_at", "2015-04-08 10:04:13.625523"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '33780f175ff9b8a3d964b40b1060a415' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:04:13.628594"], ["extension", "txt"], ["name", "Test"], ["token", "33780f175ff9b8a3d964b40b1060a415"], ["updated_at", "2015-04-08 10:04:13.628594"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:04:13.634499"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:04:13.721340"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:04:13.739303"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:04:13.738953"], ["updated_at", "2015-04-08 10:04:13.739303"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:04:13', '2015-04-08 10:04:13', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:04:13', '2015-04-08 10:04:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:04:13', '2015-04-08 10:04:13', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 10:04:13.922635"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:12:15', '2015-04-08 10:12:15', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:15', '2015-04-08 10:12:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:15', '2015-04-08 10:12:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:15', '2015-04-08 10:12:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:15', '2015-04-08 10:12:15', 779853880, 245026679, 431685987) Fixture Delete (0.6ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:12:15', '2015-04-08 10:12:15', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 10:12:15.693809"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:12:15.709848"], ["name", "test"], ["updated_at", "2015-04-08 10:12:15.709848"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:12:15.715685"], ["name", "test"], ["updated_at", "2015-04-08 10:12:15.715685"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:15.716657"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:12:15.716657"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:15.718316"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 10:12:15.718316"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:12:15.834420"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:15.865172"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 10:12:15.000000000 Z\n updated_at: 2015-04-08 10:12:15.834420000 Z\n"], ["run_at", "2015-04-08 10:12:25.838611"], ["updated_at", "2015-04-08 10:12:15.865172"]]  (1.2ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 10:12:16.100289"], ["width", 800]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:12:16.557646"]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:16.584341"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 10:12:15.000000000 Z\n updated_at: 2015-04-08 10:12:16.557646000 Z\n"], ["run_at", "2015-04-08 10:12:26.566104"], ["updated_at", "2015-04-08 10:12:16.584341"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:12:16', '2015-04-08 10:12:16', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:16', '2015-04-08 10:12:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:16', '2015-04-08 10:12:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:16', '2015-04-08 10:12:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:16', '2015-04-08 10:12:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:12:16', '2015-04-08 10:12:16', 948421225)  (1.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:12:16.747196"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:12:16.886020"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:16.900839"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:12:16.900484"], ["updated_at", "2015-04-08 10:12:16.900839"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 500 Internal Server Error in 26ms  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:12:17', '2015-04-08 10:12:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:12:17.418530"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:17.439112"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:12:17.438807"], ["updated_at", "2015-04-08 10:12:17.439112"]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:12:17', '2015-04-08 10:12:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:17', '2015-04-08 10:12:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:12:17', '2015-04-08 10:12:17', 948421225)  (5.3ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:17.885500"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 10:12:17.885500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 10:12:17.889652"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:17.893862"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:12:17.893862"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:12:17.896023"], ["name", "test"], ["updated_at", "2015-04-08 10:12:17.896023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '530bb7df2626e095ee8fd77d721a97e4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 10:12:17.905857"], ["extension", "png"], ["name", "Dummy"], ["token", "530bb7df2626e095ee8fd77d721a97e4"], ["updated_at", "2015-04-08 10:12:17.905857"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.2ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 500 Internal Server Error in 1ms  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1afde6e2ed4468f6ed775d767020c708' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:12:17.949366"], ["extension", "txt"], ["name", "Test"], ["token", "1afde6e2ed4468f6ed775d767020c708"], ["updated_at", "2015-04-08 10:12:17.949366"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '530eaa98843c594f2e79e70de625a569' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:12:17.952607"], ["extension", "txt"], ["name", "Test"], ["token", "530eaa98843c594f2e79e70de625a569"], ["updated_at", "2015-04-08 10:12:17.952607"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ee77bf1f0e6770d67cb25814ebdc8900' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:12:17.958215"], ["extension", "txt"], ["name", "Test"], ["token", "ee77bf1f0e6770d67cb25814ebdc8900"], ["updated_at", "2015-04-08 10:12:17.958215"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd8af51d02a672b8fdfdfc64623c321df' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:12:17.961045"], ["extension", "txt"], ["name", "Test"], ["token", "d8af51d02a672b8fdfdfc64623c321df"], ["updated_at", "2015-04-08 10:12:17.961045"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5403c9a6ed1f15395139bf6dc3fb38a8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:12:17.964689"], ["extension", "txt"], ["name", "Test"], ["token", "5403c9a6ed1f15395139bf6dc3fb38a8"], ["updated_at", "2015-04-08 10:12:17.964689"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:12:17.970660"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:12:18.056095"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:18.077170"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:12:18.076831"], ["updated_at", "2015-04-08 10:12:18.077170"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:12:18', '2015-04-08 10:12:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:18', '2015-04-08 10:12:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:18', '2015-04-08 10:12:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:18', '2015-04-08 10:12:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:12:18', '2015-04-08 10:12:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:12:18', '2015-04-08 10:12:18', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 11ms (Views: 0.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '381deb2352265f3f69051126a58780d4' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:12:18.290377"], ["extension", "txt"], ["name", "footest barish"], ["token", "381deb2352265f3f69051126a58780d4"], ["updated_at", "2015-04-08 10:12:18.290377"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:12:18.293205"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 10:12:18.293205"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 10:12:18.318956"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:13:28', '2015-04-08 10:13:28', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 153115190) Fixture Delete (0.7ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c4d8d9e88148e51d2ffa5365fbdf7327' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:13:28.444380"], ["extension", "txt"], ["name", "Test"], ["token", "c4d8d9e88148e51d2ffa5365fbdf7327"], ["updated_at", "2015-04-08 10:13:28.444380"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '17d9c02957a16061e21fcafe21851903' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:13:28.448541"], ["extension", "txt"], ["name", "Test"], ["token", "17d9c02957a16061e21fcafe21851903"], ["updated_at", "2015-04-08 10:13:28.448541"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'bd71a593ce33694e37277e418197e016' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:13:28.454403"], ["extension", "txt"], ["name", "Test"], ["token", "bd71a593ce33694e37277e418197e016"], ["updated_at", "2015-04-08 10:13:28.454403"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a1eb6cd4da375b29aa00b5b9ace2429e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:13:28.456917"], ["extension", "txt"], ["name", "Test"], ["token", "a1eb6cd4da375b29aa00b5b9ace2429e"], ["updated_at", "2015-04-08 10:13:28.456917"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'aa19b72da73431808a395fd17606f619' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:13:28.460478"], ["extension", "txt"], ["name", "Test"], ["token", "aa19b72da73431808a395fd17606f619"], ["updated_at", "2015-04-08 10:13:28.460478"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:13:28.475748"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:13:28', '2015-04-08 10:13:28', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:28', '2015-04-08 10:13:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:13:28', '2015-04-08 10:13:28', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:29.007163"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 10:13:29.007163"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 10:13:29.011048"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:29.015352"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:13:29.015352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:13:29.018072"], ["name", "test"], ["updated_at", "2015-04-08 10:13:29.018072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 500 Internal Server Error in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 500 Internal Server Error in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 10:13:29.068635"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:13:29.073906"], ["name", "test"], ["updated_at", "2015-04-08 10:13:29.073906"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:13:29.078145"], ["name", "test"], ["updated_at", "2015-04-08 10:13:29.078145"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:29.079079"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:13:29.079079"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:29.080023"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 10:13:29.080023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 10:13:29.107491"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 3ms  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:13:29', '2015-04-08 10:13:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:29', '2015-04-08 10:13:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:29', '2015-04-08 10:13:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:29', '2015-04-08 10:13:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:29', '2015-04-08 10:13:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:13:29', '2015-04-08 10:13:29', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 500 Internal Server Error in 11ms  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 2ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '85bc9d49b21507db7884552a5bd0fd24' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:13:29.867696"], ["extension", "txt"], ["name", "footest barish"], ["token", "85bc9d49b21507db7884552a5bd0fd24"], ["updated_at", "2015-04-08 10:13:29.867696"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:29.870104"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 10:13:29.870104"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 500 Internal Server Error in 2ms  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 3ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:13:29.891672"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 500 Internal Server Error in 5ms  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:13:30', '2015-04-08 10:13:30', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 579229346) Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:30', '2015-04-08 10:13:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:30', '2015-04-08 10:13:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:30', '2015-04-08 10:13:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:30', '2015-04-08 10:13:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:13:30', '2015-04-08 10:13:30', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:13:30.467479"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:30.487138"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 10:13:30.000000000 Z\n updated_at: 2015-04-08 10:13:30.467479000 Z\n"], ["run_at", "2015-04-08 10:13:40.471579"], ["updated_at", "2015-04-08 10:13:30.487138"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 10:13:30.735226"], ["width", 800]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:13:31.230854"]]  (5.1ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:13:31.257204"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 10:13:30.000000000 Z\n updated_at: 2015-04-08 10:13:31.230854000 Z\n"], ["run_at", "2015-04-08 10:13:41.238494"], ["updated_at", "2015-04-08 10:13:31.257204"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:13:31', '2015-04-08 10:13:31', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:31', '2015-04-08 10:13:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:31', '2015-04-08 10:13:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:31', '2015-04-08 10:13:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:13:31', '2015-04-08 10:13:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:13:31', '2015-04-08 10:13:31', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8caf6f25e545486e57845e4c8e19eba8' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 10:13:31.438209"], ["extension", "png"], ["name", "Dummy"], ["token", "8caf6f25e545486e57845e4c8e19eba8"], ["updated_at", "2015-04-08 10:13:31.438209"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 4ms  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:14:00', '2015-04-08 10:14:00', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:00', '2015-04-08 10:14:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:00', '2015-04-08 10:14:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:00', '2015-04-08 10:14:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:00', '2015-04-08 10:14:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:14:00', '2015-04-08 10:14:00', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:14:00.864470"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:14:00.970481"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:00.987955"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:14:00.987646"], ["updated_at", "2015-04-08 10:14:00.987955"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 28ms (Views: 1.9ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:14:01', '2015-04-08 10:14:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:14:01.230516"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:01.251893"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:14:01.251579"], ["updated_at", "2015-04-08 10:14:01.251893"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:14:01', '2015-04-08 10:14:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 948421225)  (1.4ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e4efaf0fb76fb9145ed8d7a5850af990' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 10:14:01.623434"], ["extension", "png"], ["name", "Dummy"], ["token", "e4efaf0fb76fb9145ed8d7a5850af990"], ["updated_at", "2015-04-08 10:14:01.623434"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.6ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '000a0ebfa350aa8da335baaa6cfde6ed' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:14:01.655977"], ["extension", "txt"], ["name", "Test"], ["token", "000a0ebfa350aa8da335baaa6cfde6ed"], ["updated_at", "2015-04-08 10:14:01.655977"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '674a648a281bd695c4aa26221b16af5a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:14:01.658766"], ["extension", "txt"], ["name", "Test"], ["token", "674a648a281bd695c4aa26221b16af5a"], ["updated_at", "2015-04-08 10:14:01.658766"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ef00d6dd0f217e46d9331d90c7f065d9' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:14:01.663872"], ["extension", "txt"], ["name", "Test"], ["token", "ef00d6dd0f217e46d9331d90c7f065d9"], ["updated_at", "2015-04-08 10:14:01.663872"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '70f738e1c4da2736d4c7903494ecbd0b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:14:01.666625"], ["extension", "txt"], ["name", "Test"], ["token", "70f738e1c4da2736d4c7903494ecbd0b"], ["updated_at", "2015-04-08 10:14:01.666625"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '287c6f3ae6d2e35c9053f1453368878b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:14:01.669863"], ["extension", "txt"], ["name", "Test"], ["token", "287c6f3ae6d2e35c9053f1453368878b"], ["updated_at", "2015-04-08 10:14:01.669863"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 10:14:01.676492"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 10:14:01.802498"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:01.819649"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 10:14:01.819314"], ["updated_at", "2015-04-08 10:14:01.819649"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:14:01', '2015-04-08 10:14:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 849405871, 624739301, 819504217) Fixture Insert (14.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:01', '2015-04-08 10:14:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:14:01', '2015-04-08 10:14:01', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 21ms (Views: 0.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e5c9b378f9f31b6d02f32dfc7a342a78' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 10:14:02.044289"], ["extension", "txt"], ["name", "footest barish"], ["token", "e5c9b378f9f31b6d02f32dfc7a342a78"], ["updated_at", "2015-04-08 10:14:02.044289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.053028"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 10:14:02.053028"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.4ms | ActiveRecord: 0.3ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 10:14:02.083395"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.091597"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 10:14:02.091597"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 10:14:02.096429"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.100490"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:14:02.100490"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:14:02.103379"], ["name", "test"], ["updated_at", "2015-04-08 10:14:02.103379"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 10:14:02.111485"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:14:02.117615"], ["name", "test"], ["updated_at", "2015-04-08 10:14:02.117615"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 10:14:02.123712"], ["name", "test"], ["updated_at", "2015-04-08 10:14:02.123712"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.124586"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 10:14:02.124586"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.125431"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 10:14:02.125431"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:14:02.207314"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.226037"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 10:14:01.000000000 Z\n updated_at: 2015-04-08 10:14:02.207314000 Z\n"], ["run_at", "2015-04-08 10:14:12.210582"], ["updated_at", "2015-04-08 10:14:02.226037"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 10:14:02.475708"], ["width", 800]]  (0.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 10:14:02.958950"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 10:14:02.980305"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 10:14:01.000000000 Z\n updated_at: 2015-04-08 10:14:02.958950000 Z\n"], ["run_at", "2015-04-08 10:14:12.966484"], ["updated_at", "2015-04-08 10:14:02.980305"]]  (1.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 10:14:03', '2015-04-08 10:14:03', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:03', '2015-04-08 10:14:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:03', '2015-04-08 10:14:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:03', '2015-04-08 10:14:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 10:14:03', '2015-04-08 10:14:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 10:14:03', '2015-04-08 10:14:03', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 14:24:51', '2015-04-08 14:24:51', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:51', '2015-04-08 14:24:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:51', '2015-04-08 14:24:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:51', '2015-04-08 14:24:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:51', '2015-04-08 14:24:51', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 14:24:51', '2015-04-08 14:24:51', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 14:24:51.654746"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:51.681098"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-08 14:24:51.000000000 Z\n updated_at: 2015-04-08 14:24:51.654746000 Z\n"], ["run_at", "2015-04-08 14:25:01.661427"], ["updated_at", "2015-04-08 14:24:51.681098"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-08 14:24:51.913079"], ["width", 800]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-08 14:24:52.369255"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:52.390354"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-08 14:24:51.000000000 Z\n updated_at: 2015-04-08 14:24:52.369255000 Z\n"], ["run_at", "2015-04-08 14:25:02.374366"], ["updated_at", "2015-04-08 14:24:52.390354"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 14:24:52', '2015-04-08 14:24:52', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-08 14:24:52.585687"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 14:24:52.602297"], ["name", "test"], ["updated_at", "2015-04-08 14:24:52.602297"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 14:24:52.607654"], ["name", "test"], ["updated_at", "2015-04-08 14:24:52.607654"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:52.608586"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-08 14:24:52.608586"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:52.609601"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-08 14:24:52.609601"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-08 14:24:52.622828"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 0.9ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9dd57e8e2a1a2b91ce6967787ebd6862' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 14:24:52.646182"], ["extension", "txt"], ["name", "Test"], ["token", "9dd57e8e2a1a2b91ce6967787ebd6862"], ["updated_at", "2015-04-08 14:24:52.646182"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8b60bca2599054b9104286265a49fa82' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 14:24:52.649551"], ["extension", "txt"], ["name", "Test"], ["token", "8b60bca2599054b9104286265a49fa82"], ["updated_at", "2015-04-08 14:24:52.649551"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '494e599b3dca88b3c312610c5c563a74' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 14:24:52.654330"], ["extension", "txt"], ["name", "Test"], ["token", "494e599b3dca88b3c312610c5c563a74"], ["updated_at", "2015-04-08 14:24:52.654330"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '4f8e40a54d588fb6b8b668e6931360ba' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 14:24:52.657442"], ["extension", "txt"], ["name", "Test"], ["token", "4f8e40a54d588fb6b8b668e6931360ba"], ["updated_at", "2015-04-08 14:24:52.657442"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '1fc1c49c071caadd620cdd912cd1285f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 14:24:52.661245"], ["extension", "txt"], ["name", "Test"], ["token", "1fc1c49c071caadd620cdd912cd1285f"], ["updated_at", "2015-04-08 14:24:52.661245"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 14:24:52.668146"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 14:24:52.769229"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:52.786513"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 14:24:52.786230"], ["updated_at", "2015-04-08 14:24:52.786513"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 14:24:52', '2015-04-08 14:24:52', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:52', '2015-04-08 14:24:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 14:24:52', '2015-04-08 14:24:52', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-08 14:24:52.972748"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 14:24:53.065700"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:53.082802"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 14:24:53.082505"], ["updated_at", "2015-04-08 14:24:53.082802"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 30ms (Views: 1.9ms | ActiveRecord: 3.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 14:24:53', '2015-04-08 14:24:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-08 14:24:53.344550"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:53.363463"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-08 14:24:53.363158"], ["updated_at", "2015-04-08 14:24:53.363463"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-08 14:24:53', '2015-04-08 14:24:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-08 14:24:53', '2015-04-08 14:24:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-08 14:24:53', '2015-04-08 14:24:53', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 0.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '93680f13edbd0e2d5374e234fa3f92e9' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-08 14:24:53.806549"], ["extension", "txt"], ["name", "footest barish"], ["token", "93680f13edbd0e2d5374e234fa3f92e9"], ["updated_at", "2015-04-08 14:24:53.806549"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:53.809145"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-08 14:24:53.809145"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.3ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:53.831103"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-08 14:24:53.831103"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-08 14:24:53.834355"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-08 14:24:53.837725"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-08 14:24:53.837725"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-08 14:24:53.839767"], ["name", "test"], ["updated_at", "2015-04-08 14:24:53.839767"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '84547597ed7ed8aea8cdbb78d84cb2e5' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-08 14:24:53.864839"], ["extension", "png"], ["name", "Dummy"], ["token", "84547597ed7ed8aea8cdbb78d84cb2e5"], ["updated_at", "2015-04-08 14:24:53.864839"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.8ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 06:20:08', '2015-04-09 06:20:08', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 153115190) Fixture Delete (0.7ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 06:20:08.079472"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 1.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 06:20:08.115044"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 06:20:08.125695"], ["name", "test"], ["updated_at", "2015-04-09 06:20:08.125695"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 06:20:08.130733"], ["name", "test"], ["updated_at", "2015-04-09 06:20:08.130733"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.131741"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 06:20:08.131741"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.132678"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 06:20:08.132678"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'd3e7fb305bc4a903ea104f80057ba1ac' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 06:20:08.146527"], ["extension", "png"], ["name", "Dummy"], ["token", "d3e7fb305bc4a903ea104f80057ba1ac"], ["updated_at", "2015-04-09 06:20:08.146527"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.1ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '76340d5affc07e6d7c1acf19e2f94b65' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 06:20:08.169854"], ["extension", "txt"], ["name", "Test"], ["token", "76340d5affc07e6d7c1acf19e2f94b65"], ["updated_at", "2015-04-09 06:20:08.169854"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '064634a3d1ecefc5f501a512ea70c31e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 06:20:08.172553"], ["extension", "txt"], ["name", "Test"], ["token", "064634a3d1ecefc5f501a512ea70c31e"], ["updated_at", "2015-04-09 06:20:08.172553"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '03497c9f161c69be8156289df50d1ff4' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 06:20:08.177116"], ["extension", "txt"], ["name", "Test"], ["token", "03497c9f161c69be8156289df50d1ff4"], ["updated_at", "2015-04-09 06:20:08.177116"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9af1324626bf4fac2a3f0c0f09a46d4f' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 06:20:08.179867"], ["extension", "txt"], ["name", "Test"], ["token", "9af1324626bf4fac2a3f0c0f09a46d4f"], ["updated_at", "2015-04-09 06:20:08.179867"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'de84c1ece4a4c4ac4d01bb1278406d48' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 06:20:08.183823"], ["extension", "txt"], ["name", "Test"], ["token", "de84c1ece4a4c4ac4d01bb1278406d48"], ["updated_at", "2015-04-09 06:20:08.183823"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 06:20:08.189080"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 06:20:08.327311"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.342507"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 06:20:08.342145"], ["updated_at", "2015-04-09 06:20:08.342507"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 06:20:08', '2015-04-09 06:20:08', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.519586"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-09 06:20:08.519586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 06:20:08.523095"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.526987"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-09 06:20:08.526987"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 06:20:08.529145"], ["name", "test"], ["updated_at", "2015-04-09 06:20:08.529145"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 06:20:08.534540"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (2.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 06:20:08.647450"]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.670381"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 06:20:08.669817"], ["updated_at", "2015-04-09 06:20:08.670381"]]  (1.3ms) commit transaction  (0.1ms) begin transaction  (0.7ms) commit transaction Completed 200 OK in 36ms (Views: 1.7ms | ActiveRecord: 6.4ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 431685987) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 06:20:08', '2015-04-09 06:20:08', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:08', '2015-04-09 06:20:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 06:20:08', '2015-04-09 06:20:08', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 0.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ede9054b3c65f26c93ade05ee9139f57' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 06:20:08.901358"], ["extension", "txt"], ["name", "footest barish"], ["token", "ede9054b3c65f26c93ade05ee9139f57"], ["updated_at", "2015-04-09 06:20:08.901358"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:08.904210"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 06:20:08.904210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 06:20:09.007877"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:09.028097"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 06:20:09.027801"], ["updated_at", "2015-04-09 06:20:09.028097"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 06:20:09', '2015-04-09 06:20:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:09', '2015-04-09 06:20:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:09', '2015-04-09 06:20:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:09', '2015-04-09 06:20:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:09', '2015-04-09 06:20:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 06:20:09', '2015-04-09 06:20:09', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 06:20:09.502552"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:09.521412"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 06:20:09.000000000 Z\n updated_at: 2015-04-09 06:20:09.502552000 Z\n"], ["run_at", "2015-04-09 06:20:19.505897"], ["updated_at", "2015-04-09 06:20:09.521412"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 06:20:09.766793"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 06:20:10.276922"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 06:20:10.294439"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 06:20:09.000000000 Z\n updated_at: 2015-04-09 06:20:10.276922000 Z\n"], ["run_at", "2015-04-09 06:20:20.280368"], ["updated_at", "2015-04-09 06:20:10.294439"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 06:20:10', '2015-04-09 06:20:10', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:10', '2015-04-09 06:20:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:10', '2015-04-09 06:20:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:10', '2015-04-09 06:20:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 06:20:10', '2015-04-09 06:20:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 06:20:10', '2015-04-09 06:20:10', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 0.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 12:18:55', '2015-04-09 12:18:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 12:18:55.218322"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 0.9ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.0ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 12:18:55.348778"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:55.374395"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 12:18:55.374082"], ["updated_at", "2015-04-09 12:18:55.374395"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 37ms (Views: 1.5ms | ActiveRecord: 3.6ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 12:18:55', '2015-04-09 12:18:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '42211356a30e34c826282e8dc0f6a647' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 12:18:55.564360"], ["extension", "txt"], ["name", "Test"], ["token", "42211356a30e34c826282e8dc0f6a647"], ["updated_at", "2015-04-09 12:18:55.564360"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cb4a99e8e0c828462357ec49289c1795' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 12:18:55.567884"], ["extension", "txt"], ["name", "Test"], ["token", "cb4a99e8e0c828462357ec49289c1795"], ["updated_at", "2015-04-09 12:18:55.567884"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8ff8d9aab7ec938b4d349b1eab8bcf3d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 12:18:55.573843"], ["extension", "txt"], ["name", "Test"], ["token", "8ff8d9aab7ec938b4d349b1eab8bcf3d"], ["updated_at", "2015-04-09 12:18:55.573843"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'c4dddf2d688fb77237597d27cc87254c' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 12:18:55.576700"], ["extension", "txt"], ["name", "Test"], ["token", "c4dddf2d688fb77237597d27cc87254c"], ["updated_at", "2015-04-09 12:18:55.576700"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '297e8dfc18251d12fe77db20a7b7b146' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 12:18:55.580760"], ["extension", "txt"], ["name", "Test"], ["token", "297e8dfc18251d12fe77db20a7b7b146"], ["updated_at", "2015-04-09 12:18:55.580760"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 12:18:55.595373"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 12:18:55.701831"]]  (0.6ms) commit transaction  (32.9ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:55.754410"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 12:18:55.754021"], ["updated_at", "2015-04-09 12:18:55.754410"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 12:18:55', '2015-04-09 12:18:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:55', '2015-04-09 12:18:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 12:18:55', '2015-04-09 12:18:55', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 0.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cf3a4704c930d02ab848a6d9bbda4fb8' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 12:18:55.970674"], ["extension", "txt"], ["name", "footest barish"], ["token", "cf3a4704c930d02ab848a6d9bbda4fb8"], ["updated_at", "2015-04-09 12:18:55.970674"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:55.979847"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 12:18:55.979847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:56.005152"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-09 12:18:56.005152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 12:18:56.010108"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:56.013740"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-09 12:18:56.013740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 12:18:56.015935"], ["name", "test"], ["updated_at", "2015-04-09 12:18:56.015935"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 12:18:56.109724"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:56.130182"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 12:18:55.000000000 Z\n updated_at: 2015-04-09 12:18:56.109724000 Z\n"], ["run_at", "2015-04-09 12:19:06.113433"], ["updated_at", "2015-04-09 12:18:56.130182"]]  (0.7ms) commit transaction  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 12:18:56.401941"], ["width", 800]]  (0.9ms) commit transaction  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 12:18:56.896583"]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:56.922761"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 12:18:55.000000000 Z\n updated_at: 2015-04-09 12:18:56.896583000 Z\n"], ["run_at", "2015-04-09 12:19:06.904377"], ["updated_at", "2015-04-09 12:18:56.922761"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 12:18:57', '2015-04-09 12:18:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 12:18:57.118002"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '131c7038d3fda236704b5d7e36252506' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 12:18:57.126309"], ["extension", "png"], ["name", "Dummy"], ["token", "131c7038d3fda236704b5d7e36252506"], ["updated_at", "2015-04-09 12:18:57.126309"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 12:18:57.157797"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 12:18:57.163289"], ["name", "test"], ["updated_at", "2015-04-09 12:18:57.163289"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 12:18:57.168306"], ["name", "test"], ["updated_at", "2015-04-09 12:18:57.168306"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:57.169499"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 12:18:57.169499"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:57.170501"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 12:18:57.170501"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 12:18:57.266908"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 12:18:57.285927"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 12:18:57.285625"], ["updated_at", "2015-04-09 12:18:57.285927"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (2.3ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 12:18:57', '2015-04-09 12:18:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 12:18:57', '2015-04-09 12:18:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 12:18:57', '2015-04-09 12:18:57', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:02:17', '2015-04-09 14:02:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 948421225)  (0.7ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ae7e9314259c820027a9b5c972a38ab1' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 14:02:17.331777"], ["extension", "png"], ["name", "Dummy"], ["token", "ae7e9314259c820027a9b5c972a38ab1"], ["updated_at", "2015-04-09 14:02:17.331777"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 2.3ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:17.378480"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-09 14:02:17.378480"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 14:02:17.382260"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:17.386542"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:02:17.386542"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:02:17.388610"], ["name", "test"], ["updated_at", "2015-04-09 14:02:17.388610"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 14:02:17.436197"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:02:17.441548"], ["name", "test"], ["updated_at", "2015-04-09 14:02:17.441548"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:02:17.457202"], ["name", "test"], ["updated_at", "2015-04-09 14:02:17.457202"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:17.458338"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:02:17.458338"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:17.459351"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 14:02:17.459351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '785de051ae686aedee1c968a15ff985e' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:02:17.463087"], ["extension", "txt"], ["name", "Test"], ["token", "785de051ae686aedee1c968a15ff985e"], ["updated_at", "2015-04-09 14:02:17.463087"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '3a95d6180e942fb9d1af84724a88d089' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:02:17.466822"], ["extension", "txt"], ["name", "Test"], ["token", "3a95d6180e942fb9d1af84724a88d089"], ["updated_at", "2015-04-09 14:02:17.466822"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9a06e29767603dbe30da69e014edc982' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:02:17.473548"], ["extension", "txt"], ["name", "Test"], ["token", "9a06e29767603dbe30da69e014edc982"], ["updated_at", "2015-04-09 14:02:17.473548"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'ab0a5b9b60be51b56b7593f498d8e40a' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:02:17.476514"], ["extension", "txt"], ["name", "Test"], ["token", "ab0a5b9b60be51b56b7593f498d8e40a"], ["updated_at", "2015-04-09 14:02:17.476514"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '834953b33b68dcff618c640ea752c8a3' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:02:17.479926"], ["extension", "txt"], ["name", "Test"], ["token", "834953b33b68dcff618c640ea752c8a3"], ["updated_at", "2015-04-09 14:02:17.479926"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:02:17.486381"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:02:17.629749"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:17.658863"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:02:17.658425"], ["updated_at", "2015-04-09 14:02:17.658863"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:02:17', '2015-04-09 14:02:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:17', '2015-04-09 14:02:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:02:17', '2015-04-09 14:02:17', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 14:02:17.853076"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.7ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:02:17.941296"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:17.960852"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:02:17.960557"], ["updated_at", "2015-04-09 14:02:17.960852"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:02:18', '2015-04-09 14:02:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:02:18.384938"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.0ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:02:18.524761"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:18.548617"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:02:18.548318"], ["updated_at", "2015-04-09 14:02:18.548617"]]  (0.7ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 34ms (Views: 1.6ms | ActiveRecord: 3.2ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:02:18', '2015-04-09 14:02:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:02:18', '2015-04-09 14:02:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:02:18', '2015-04-09 14:02:18', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 11ms (Views: 0.9ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f7ea77946e20e6367a5a493623b54e40' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:02:18.758516"], ["extension", "txt"], ["name", "footest barish"], ["token", "f7ea77946e20e6367a5a493623b54e40"], ["updated_at", "2015-04-09 14:02:18.758516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:18.761314"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 14:02:18.761314"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:02:18.880260"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:18.900058"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 14:02:18.000000000 Z\n updated_at: 2015-04-09 14:02:18.880260000 Z\n"], ["run_at", "2015-04-09 14:02:28.883770"], ["updated_at", "2015-04-09 14:02:18.900058"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 14:02:19.157963"], ["width", 800]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.8ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:02:19.786057"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:02:19.812722"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 14:02:18.000000000 Z\n updated_at: 2015-04-09 14:02:19.786057000 Z\n"], ["run_at", "2015-04-09 14:02:29.790374"], ["updated_at", "2015-04-09 14:02:19.812722"]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:10:45', '2015-04-09 14:10:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:45', '2015-04-09 14:10:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:45', '2015-04-09 14:10:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:45', '2015-04-09 14:10:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:45', '2015-04-09 14:10:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:10:45', '2015-04-09 14:10:45', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:10:45.840320"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:45.861847"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:10:45.861497"], ["updated_at", "2015-04-09 14:10:45.861847"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:10:46', '2015-04-09 14:10:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 14:10:46.244289"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.1ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9ac615b027ac4a030651713c1087b671' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:10:46.258633"], ["extension", "txt"], ["name", "Test"], ["token", "9ac615b027ac4a030651713c1087b671"], ["updated_at", "2015-04-09 14:10:46.258633"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f115af047766d66d702f2f9db602770b' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:10:46.261669"], ["extension", "txt"], ["name", "Test"], ["token", "f115af047766d66d702f2f9db602770b"], ["updated_at", "2015-04-09 14:10:46.261669"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e3bcfe5f705617b91a05799a6e215304' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:10:46.266445"], ["extension", "txt"], ["name", "Test"], ["token", "e3bcfe5f705617b91a05799a6e215304"], ["updated_at", "2015-04-09 14:10:46.266445"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'dff9d435108a7c7e038e4fbb90f7ae2f' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:10:46.269151"], ["extension", "txt"], ["name", "Test"], ["token", "dff9d435108a7c7e038e4fbb90f7ae2f"], ["updated_at", "2015-04-09 14:10:46.269151"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '5faf165fa2940205ab7d43ff4e1c88d0' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:10:46.273021"], ["extension", "txt"], ["name", "Test"], ["token", "5faf165fa2940205ab7d43ff4e1c88d0"], ["updated_at", "2015-04-09 14:10:46.273021"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:10:46.284915"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:10:46.382838"]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:46.404364"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:10:46.403880"], ["updated_at", "2015-04-09 14:10:46.404364"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:10:46', '2015-04-09 14:10:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:46', '2015-04-09 14:10:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:10:46', '2015-04-09 14:10:46', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 1ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.9ms | ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 14:10:46.607218"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:10:46.612360"], ["name", "test"], ["updated_at", "2015-04-09 14:10:46.612360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:10:46.618952"], ["name", "test"], ["updated_at", "2015-04-09 14:10:46.618952"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:46.619987"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:10:46.619987"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:46.620906"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 14:10:46.620906"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '583ef52b75e86a95e06bb95838ff3d05' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 14:10:46.627405"], ["extension", "png"], ["name", "Dummy"], ["token", "583ef52b75e86a95e06bb95838ff3d05"], ["updated_at", "2015-04-09 14:10:46.627405"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 9ms (Views: 0.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '7d84de5ff8425bbe38d31391a3385f88' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:10:46.681698"], ["extension", "txt"], ["name", "footest barish"], ["token", "7d84de5ff8425bbe38d31391a3385f88"], ["updated_at", "2015-04-09 14:10:46.681698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:46.684719"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 14:10:46.684719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:10:46.791536"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:46.812107"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 14:10:46.000000000 Z\n updated_at: 2015-04-09 14:10:46.791536000 Z\n"], ["run_at", "2015-04-09 14:10:56.794864"], ["updated_at", "2015-04-09 14:10:46.812107"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 14:10:47.064066"], ["width", 800]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:10:47.560240"]]  (5.4ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:47.587902"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 14:10:46.000000000 Z\n updated_at: 2015-04-09 14:10:47.560240000 Z\n"], ["run_at", "2015-04-09 14:10:57.568400"], ["updated_at", "2015-04-09 14:10:47.587902"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:10:47', '2015-04-09 14:10:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:47', '2015-04-09 14:10:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:47', '2015-04-09 14:10:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:47', '2015-04-09 14:10:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:47', '2015-04-09 14:10:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:10:47', '2015-04-09 14:10:47', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:10:47.780333"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:10:47.867943"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:47.885458"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:10:47.885185"], ["updated_at", "2015-04-09 14:10:47.885458"]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 26ms (Views: 1.6ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.0ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:10:48', '2015-04-09 14:10:48', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:48', '2015-04-09 14:10:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:48', '2015-04-09 14:10:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:48', '2015-04-09 14:10:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:10:48', '2015-04-09 14:10:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:10:48', '2015-04-09 14:10:48', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:48.069356"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-09 14:10:48.069356"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 14:10:48.073236"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:10:48.077788"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:10:48.077788"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:10:48.080294"], ["name", "test"], ["updated_at", "2015-04-09 14:10:48.080294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateFoggedResources (20150409142025)  (0.1ms) begin transaction  (0.2ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  SQLite3::SQLException: table "fogged_resources" already exists: CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:21:12', '2015-04-09 14:21:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 1ms (Views: 0.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 18ms (Views: 0.7ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.5ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'a40f10c2b0c5b4d79339f1a4a21d0749' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:21:12.246508"], ["extension", "txt"], ["name", "footest barish"], ["token", "a40f10c2b0c5b4d79339f1a4a21d0749"], ["updated_at", "2015-04-09 14:21:12.246508"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:12.253508"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 14:21:12.253508"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:12.275298"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-09 14:21:12.275298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 14:21:12.279174"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:12.288529"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:21:12.288529"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:21:12.290574"], ["name", "test"], ["updated_at", "2015-04-09 14:21:12.290574"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '8eb819efdf7669decf50abb0c471cbcd' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 14:21:12.304513"], ["extension", "png"], ["name", "Dummy"], ["token", "8eb819efdf7669decf50abb0c471cbcd"], ["updated_at", "2015-04-09 14:21:12.304513"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 1.0ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:21:12.334891"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:21:12.427969"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:12.447206"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:21:12.446908"], ["updated_at", "2015-04-09 14:21:12.447206"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 29ms (Views: 1.7ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:21:12', '2015-04-09 14:21:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:12', '2015-04-09 14:21:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:21:12', '2015-04-09 14:21:12', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:21:12.717429"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:12.737922"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 14:21:12.000000000 Z\n updated_at: 2015-04-09 14:21:12.717429000 Z\n"], ["run_at", "2015-04-09 14:21:22.721716"], ["updated_at", "2015-04-09 14:21:12.737922"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 14:21:13.004347"], ["width", 800]]  (1.2ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:21:13.597358"]]  (1.3ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:13.631654"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 14:21:12.000000000 Z\n updated_at: 2015-04-09 14:21:13.597358000 Z\n"], ["run_at", "2015-04-09 14:21:23.603909"], ["updated_at", "2015-04-09 14:21:13.631654"]]  (1.9ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:21:13', '2015-04-09 14:21:13', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:13', '2015-04-09 14:21:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:13', '2015-04-09 14:21:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:13', '2015-04-09 14:21:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:13', '2015-04-09 14:21:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:21:13', '2015-04-09 14:21:13', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 14:21:13.893398"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'cab15b240fb5f87221e0fd68a39500e2' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:21:13.898380"], ["extension", "txt"], ["name", "Test"], ["token", "cab15b240fb5f87221e0fd68a39500e2"], ["updated_at", "2015-04-09 14:21:13.898380"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f9228d50ecf588ad77fa809f140a0e03' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:21:13.901023"], ["extension", "txt"], ["name", "Test"], ["token", "f9228d50ecf588ad77fa809f140a0e03"], ["updated_at", "2015-04-09 14:21:13.901023"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '78269432a140a54826881660c03f3862' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:21:13.905957"], ["extension", "txt"], ["name", "Test"], ["token", "78269432a140a54826881660c03f3862"], ["updated_at", "2015-04-09 14:21:13.905957"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'e4730fa91d86a2c5f467ee66e93ac71d' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:21:13.908505"], ["extension", "txt"], ["name", "Test"], ["token", "e4730fa91d86a2c5f467ee66e93ac71d"], ["updated_at", "2015-04-09 14:21:13.908505"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '9d2b7aa58a6ecea74898ed941df12508' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:21:13.912020"], ["extension", "txt"], ["name", "Test"], ["token", "9d2b7aa58a6ecea74898ed941df12508"], ["updated_at", "2015-04-09 14:21:13.912020"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:21:13.917902"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:21:14.010530"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:14.027536"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:21:14.027243"], ["updated_at", "2015-04-09 14:21:14.027536"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:21:14', '2015-04-09 14:21:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 14:21:14.207185"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:21:14.212683"], ["name", "test"], ["updated_at", "2015-04-09 14:21:14.212683"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:21:14.217404"], ["name", "test"], ["updated_at", "2015-04-09 14:21:14.217404"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:14.218275"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:21:14.218275"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:14.219164"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 14:21:14.219164"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:21:14.302575"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:21:14.319792"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:21:14.319423"], ["updated_at", "2015-04-09 14:21:14.319792"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:21:14', '2015-04-09 14:21:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:21:14', '2015-04-09 14:21:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:21:14', '2015-04-09 14:21:14', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (5.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)   (0.1ms) select sqlite_version(*)  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime) SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.7ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.7ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.0ms) begin transaction  (0.3ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (1.3ms) commit transaction Migrating to CreateDelayedJobs (20141105073909)  (0.2ms) begin transaction  (0.5ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.2ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141105073909"]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.9ms) DROP TABLE "delayed_jobs"  (0.7ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.7ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)   (0.6ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.7ms) DROP TABLE "images"  (0.7ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.6ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.6ms) CREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'   (0.7ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (0.8ms) DROP TABLE "movies"  (1.1ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.1ms) SELECT version FROM "schema_migrations"  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:24:39', '2015-04-09 14:24:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 14:24:39.135519"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:24:39.149350"], ["name", "test"], ["updated_at", "2015-04-09 14:24:39.149350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:24:39.156227"], ["name", "test"], ["updated_at", "2015-04-09 14:24:39.156227"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:39.158168"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:24:39.158168"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:39.160103"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 14:24:39.160103"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:24:39.309693"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:39.334352"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:24:39.333891"], ["updated_at", "2015-04-09 14:24:39.334352"]]  (1.2ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:24:39', '2015-04-09 14:24:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:39', '2015-04-09 14:24:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:24:39', '2015-04-09 14:24:39', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms  (0.1ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 14:24:39.806703"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 0.8ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '19a2a1d979bf71f203bebbb33ac71f46' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 14:24:39.823463"], ["extension", "png"], ["name", "Dummy"], ["token", "19a2a1d979bf71f203bebbb33ac71f46"], ["updated_at", "2015-04-09 14:24:39.823463"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.8ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 6ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.6ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 1.2ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '389d917f00fc5a10f467cb94460f33eb' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:24:39.905988"], ["extension", "txt"], ["name", "footest barish"], ["token", "389d917f00fc5a10f467cb94460f33eb"], ["updated_at", "2015-04-09 14:24:39.905988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:39.908450"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 14:24:39.908450"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 0.6ms)  (0.3ms) rollback transaction  (0.4ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 14:24:39.953931"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:24:39.960750"], ["name", "test"], ["updated_at", "2015-04-09 14:24:39.960750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'b429d3afde5411cc99985dd30f9a5eeb' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:24:39.964840"], ["extension", "txt"], ["name", "Test"], ["token", "b429d3afde5411cc99985dd30f9a5eeb"], ["updated_at", "2015-04-09 14:24:39.964840"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2371a0c9bed032d3e1869c9a2b48c361' LIMIT 1 SQL (0.7ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:24:39.972075"], ["extension", "txt"], ["name", "Test"], ["token", "2371a0c9bed032d3e1869c9a2b48c361"], ["updated_at", "2015-04-09 14:24:39.972075"], ["uploading", "f"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '55dfdc9f298039e4f6eda5f733dc5c9a' LIMIT 1 SQL (0.5ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:24:39.982039"], ["extension", "txt"], ["name", "Test"], ["token", "55dfdc9f298039e4f6eda5f733dc5c9a"], ["updated_at", "2015-04-09 14:24:39.982039"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '2d68200497110c10ee733d577e5e2b97' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:24:39.987784"], ["extension", "txt"], ["name", "Test"], ["token", "2d68200497110c10ee733d577e5e2b97"], ["updated_at", "2015-04-09 14:24:39.987784"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '126fc2e3eeaa4321bb9de4e6c63a1fcb' LIMIT 1 SQL (0.2ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:24:39.993476"], ["extension", "txt"], ["name", "Test"], ["token", "126fc2e3eeaa4321bb9de4e6c63a1fcb"], ["updated_at", "2015-04-09 14:24:39.993476"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:24:40.003197"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:24:40.105894"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:40.123988"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:24:40.123681"], ["updated_at", "2015-04-09 14:24:40.123988"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:24:40', '2015-04-09 14:24:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:40', '2015-04-09 14:24:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:40', '2015-04-09 14:24:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:40', '2015-04-09 14:24:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:40', '2015-04-09 14:24:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:24:40', '2015-04-09 14:24:40', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:24:40.420475"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:40.444177"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 14:24:40.000000000 Z\n updated_at: 2015-04-09 14:24:40.420475000 Z\n"], ["run_at", "2015-04-09 14:24:50.424278"], ["updated_at", "2015-04-09 14:24:40.444177"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 14:24:40.715913"], ["width", 800]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:24:41.217341"]]  (4.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:41.248104"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 14:24:40.000000000 Z\n updated_at: 2015-04-09 14:24:41.217341000 Z\n"], ["run_at", "2015-04-09 14:24:51.224562"], ["updated_at", "2015-04-09 14:24:41.248104"]]  (0.9ms) commit transaction  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:24:41', '2015-04-09 14:24:41', 538821867) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:41', '2015-04-09 14:24:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:41', '2015-04-09 14:24:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:41', '2015-04-09 14:24:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:24:41', '2015-04-09 14:24:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:24:41', '2015-04-09 14:24:41', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:24:41.495776"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.2ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:24:41.622012"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:24:41.640982"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:24:41.640705"], ["updated_at", "2015-04-09 14:24:41.640982"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 30ms (Views: 2.0ms | ActiveRecord: 3.2ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (4.3ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.5ms) select sqlite_version(*)  (2.2ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.2ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.8ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'   (0.8ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (0.9ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.4ms) DROP TABLE "images"  (0.1ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (1.0ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.3ms) DROP TABLE "movies"  (0.1ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.7ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.2ms) begin transaction  (0.7ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (1.1ms) commit transaction Migrating to CreateFoggedResources (20150409142508)  (0.1ms) begin transaction  (0.2ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  SQLite3::SQLException: table "fogged_resources" already exists: CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.1ms) rollback transaction  (5.6ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (1.1ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.1ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.7ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'   (1.1ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (1.3ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (1.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.6ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.9ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.8ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:18', '2015-04-09 14:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:18', '2015-04-09 14:26:18', 153115190)  (0.5ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.5ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.4ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.5ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.4ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.6ms) rollback transaction  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.7ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:26:19', '2015-04-09 14:26:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:26:19', '2015-04-09 14:26:19', 153115190)  (0.4ms) rollback transaction  (6.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar(255), "queue" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.7ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.7ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255) NOT NULL, "token" varchar(255) NOT NULL, "width" integer, "height" integer, "extension" varchar(255) NOT NULL, "uploading" boolean, "content_type" varchar(255) NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar(255), "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.7ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.6ms) CREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'   (0.7ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (0.8ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141103143408') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.8ms) DROP TABLE "images"  (0.2ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.7ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.6ms) DROP TABLE "movies"  (0.2ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "created_at" datetime, "updated_at" datetime) SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (1.1ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'  (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (1.2ms) commit transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:30:42', '2015-04-09 14:30:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '98d077ab07ba6f676abb8167e02cecc8' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:30:42.052817"], ["extension", "txt"], ["name", "Test"], ["token", "98d077ab07ba6f676abb8167e02cecc8"], ["updated_at", "2015-04-09 14:30:42.052817"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = 'f2b34b8879a6935788a2045262f262b8' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:30:42.057484"], ["extension", "txt"], ["name", "Test"], ["token", "f2b34b8879a6935788a2045262f262b8"], ["updated_at", "2015-04-09 14:30:42.057484"], ["uploading", "f"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '0264162310c92981ca8e65df012758f3' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:30:42.064725"], ["extension", "txt"], ["name", "Test"], ["token", "0264162310c92981ca8e65df012758f3"], ["updated_at", "2015-04-09 14:30:42.064725"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '29448a4473bcfdb7df0d3c552412049f' LIMIT 1 SQL (0.8ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:30:42.068734"], ["extension", "txt"], ["name", "Test"], ["token", "29448a4473bcfdb7df0d3c552412049f"], ["updated_at", "2015-04-09 14:30:42.068734"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '528995ad1b1faba33917e34340df43e5' LIMIT 1 SQL (0.3ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:30:42.078268"], ["extension", "txt"], ["name", "Test"], ["token", "528995ad1b1faba33917e34340df43e5"], ["updated_at", "2015-04-09 14:30:42.078268"], ["uploading", "f"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:30:42.095108"], ["width", 800]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:30:42.205669"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.229309"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:30:42.228993"], ["updated_at", "2015-04-09 14:30:42.229309"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:30:42', '2015-04-09 14:30:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 40ms (Views: 0.8ms | ActiveRecord: 0.6ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '268482a3fd77af6d59392a0c7b823ce4' LIMIT 1 SQL (0.4ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["content_type", "text/plain"], ["created_at", "2015-04-09 14:30:42.500606"], ["extension", "txt"], ["name", "footest barish"], ["token", "268482a3fd77af6d59392a0c7b823ce4"], ["updated_at", "2015-04-09 14:30:42.500606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.509610"], ["movie_id", 624739301], ["resource_id", 819504218], ["updated_at", "2015-04-09 14:30:42.509610"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 0.9ms | ActiveRecord: 0.5ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 1.5ms | ActiveRecord: 0.7ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (1234567890) Completed 200 OK in 1ms (Views: 0.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 1.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.569635"], ["name", "test"], ["resource_id", 591498715], ["updated_at", "2015-04-09 14:30:42.569635"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 701625837 [["updated_at", "2015-04-09 14:30:42.576164"], ["uploading", "t"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("created_at", "name", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.580134"], ["name", "test"], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:30:42.580134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:30:42.582362"], ["name", "test"], ["updated_at", "2015-04-09 14:30:42.582362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 591498715 [["height", 600], ["updated_at", "2015-04-09 14:30:42.587152"], ["width", 800]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 0.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:30:42.684200"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.704212"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:30:42.703804"], ["updated_at", "2015-04-09 14:30:42.704212"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 31ms (Views: 1.7ms | ActiveRecord: 3.1ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:30:42', '2015-04-09 14:30:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:42', '2015-04-09 14:30:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:30:42', '2015-04-09 14:30:42', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 591498715 [["name", "Update"], ["updated_at", "2015-04-09 14:30:42.906804"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "fogged_resources" SET "updated_at" = ?, "uploading" = ? WHERE "fogged_resources"."id" = 431685987 [["updated_at", "2015-04-09 14:30:42.930783"], ["uploading", "t"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:30:42.940919"], ["name", "test"], ["updated_at", "2015-04-09 14:30:42.940919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("created_at", "name", "updated_at") VALUES (?, ?, ?) [["created_at", "2015-04-09 14:30:42.947197"], ["name", "test"], ["updated_at", "2015-04-09 14:30:42.947197"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.948371"], ["movie_id", 948421226], ["resource_id", 701625837], ["updated_at", "2015-04-09 14:30:42.948371"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "movie_id", "resource_id", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:42.950159"], ["movie_id", 948421226], ["resource_id", 819504217], ["updated_at", "2015-04-09 14:30:42.950159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 68463692 [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:30:43.053666"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:43.077208"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:30:43.076934"], ["updated_at", "2015-04-09 14:30:43.077208"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', 1234567890, 10, '2015-04-09 14:30:43', '2015-04-09 14:30:43', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:43', '2015-04-09 14:30:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:43', '2015-04-09 14:30:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:43', '2015-04-09 14:30:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:30:43', '2015-04-09 14:30:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:30:43', '2015-04-09 14:30:43', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = '98b60881637dcf71772d043eb4c94c9c' LIMIT 1 SQL (0.6ms) INSERT INTO "fogged_resources" ("content_type", "created_at", "extension", "name", "token", "updated_at", "uploading") VALUES (?, ?, ?, ?, ?, ?, ?) [["content_type", "image/png"], ["created_at", "2015-04-09 14:30:43.526796"], ["extension", "png"], ["name", "Dummy"], ["token", "98b60881637dcf71772d043eb4c94c9c"], ["updated_at", "2015-04-09 14:30:43.526796"], ["uploading", "t"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 1.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 1ms  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:30:43.673660"]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:43.692144"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: \n created_at: 2015-04-09 14:30:43.000000000 Z\n updated_at: 2015-04-09 14:30:43.673660000 Z\n"], ["run_at", "2015-04-09 14:30:53.676994"], ["updated_at", "2015-04-09 14:30:43.692144"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "duration" = ?, "encoding_progress" = ?, "height" = ?, "updated_at" = ?, "width" = ? WHERE "fogged_resources"."id" = 538821867 [["duration", 15], ["encoding_progress", 100], ["height", 600], ["updated_at", "2015-04-09 14:30:43.942782"], ["width", 800]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = 538821867 [["encoding_progress", 55], ["updated_at", "2015-04-09 14:30:44.452674"]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("created_at", "handler", "run_at", "updated_at") VALUES (?, ?, ?, ?) [["created_at", "2015-04-09 14:30:44.480682"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n attributes:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: false\n content_type: video/quicktime\n encoding_progress: 55\n encoding_job_id: '1234567890'\n duration: 15\n created_at: 2015-04-09 14:30:43.000000000 Z\n updated_at: 2015-04-09 14:30:44.452674000 Z\n"], ["run_at", "2015-04-09 14:30:54.460045"], ["updated_at", "2015-04-09 14:30:44.480682"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:41:15', '2015-04-09 14:41:15', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:15', '2015-04-09 14:41:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:15', '2015-04-09 14:41:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:15', '2015-04-09 14:41:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:15', '2015-04-09 14:41:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:41:15', '2015-04-09 14:41:15', 948421225)  (1.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:41:15.639035"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:41:15.659721"], ["created_at", "2015-04-09 14:41:15.660097"], ["updated_at", "2015-04-09 14:41:15.660097"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:41:16', '2015-04-09 14:41:16', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:16', '2015-04-09 14:41:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:16', '2015-04-09 14:41:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:16', '2015-04-09 14:41:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:16', '2015-04-09 14:41:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:41:16', '2015-04-09 14:41:16', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 14:41:16.077366"], ["updated_at", "2015-04-09 14:41:16.077366"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 14:41:16.085412"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 14:41:16.125416"], ["updated_at", "2015-04-09 14:41:16.125416"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:41:16.132098"], ["updated_at", "2015-04-09 14:41:16.132098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 14:41:16.264202"], ["id", 538821867]]  (1.0ms) commit transaction  (0.2ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 14:41:26.270317"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 14:41:16'\n updated_at: &6 2015-04-09 14:41:16.264202000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: 255\n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 14:41:16'\n updated_at: '2015-04-09 14:41:16'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 14:41:16'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 14:41:16.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 14:41:16.300812"], ["updated_at", "2015-04-09 14:41:16.300812"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 14:41:16.574542"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 14:41:17.119341"], ["id", 538821867]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 14:41:27.126908"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 14:41:16'\n updated_at: &6 2015-04-09 14:41:17.119341000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: 255\n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 14:41:16'\n updated_at: '2015-04-09 14:41:16.574542'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 14:41:16'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 14:41:16.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 14:41:17.161246"], ["updated_at", "2015-04-09 14:41:17.161246"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:41:17', '2015-04-09 14:41:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c09fa49aa633997d7d6205d134da6074"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c09fa49aa633997d7d6205d134da6074"], ["created_at", "2015-04-09 14:41:17.378362"], ["updated_at", "2015-04-09 14:41:17.378362"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a07575128d67dde2994178cee20e2137"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a07575128d67dde2994178cee20e2137"], ["created_at", "2015-04-09 14:41:17.382706"], ["updated_at", "2015-04-09 14:41:17.382706"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cacc144c9b16fd36e7dd2e6318ab3b1d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cacc144c9b16fd36e7dd2e6318ab3b1d"], ["created_at", "2015-04-09 14:41:17.389781"], ["updated_at", "2015-04-09 14:41:17.389781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8c91fb55404aa414e1cbf02d239c18eb"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8c91fb55404aa414e1cbf02d239c18eb"], ["created_at", "2015-04-09 14:41:17.395411"], ["updated_at", "2015-04-09 14:41:17.395411"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f80e28d290d08dbc30e366d71c740a6c"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f80e28d290d08dbc30e366d71c740a6c"], ["created_at", "2015-04-09 14:41:17.405961"], ["updated_at", "2015-04-09 14:41:17.405961"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 14:41:17.418711"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:41:17.544655"], ["id", 68463692]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:41:17.569540"], ["created_at", "2015-04-09 14:41:17.569890"], ["updated_at", "2015-04-09 14:41:17.569890"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:41:17', '2015-04-09 14:41:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:17', '2015-04-09 14:41:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:41:17', '2015-04-09 14:41:17', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms (ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 13ms (Views: 7.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 14:41:17.814736"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:41:17.939050"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:41:17.963417"], ["created_at", "2015-04-09 14:41:17.964305"], ["updated_at", "2015-04-09 14:41:17.964305"]]  (0.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 42ms (Views: 6.7ms | ActiveRecord: 3.1ms)  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:41:18', '2015-04-09 14:41:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:18', '2015-04-09 14:41:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:18', '2015-04-09 14:41:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:18', '2015-04-09 14:41:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:41:18', '2015-04-09 14:41:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:41:18', '2015-04-09 14:41:18', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"1234567890", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"id"=>"591498715", "resource"=>{"name"=>"Update"}} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 14:41:18.159864"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.6ms | ActiveRecord: 1.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 49ms (Views: 3.7ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7cf569c7e1ef82dc8c8f62ccc9cc4e37"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "7cf569c7e1ef82dc8c8f62ccc9cc4e37"], ["created_at", "2015-04-09 14:41:18.251568"], ["updated_at", "2015-04-09 14:41:18.251568"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 14:41:18.260419"], ["updated_at", "2015-04-09 14:41:18.260419"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.5ms)  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 18ms (Views: 6.9ms | ActiveRecord: 1.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8d0fbecf4594e93a9e6b938f9df22d92"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "8d0fbecf4594e93a9e6b938f9df22d92"], ["created_at", "2015-04-09 14:41:18.323264"], ["updated_at", "2015-04-09 14:41:18.323264"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.6ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 14:41:18.370601"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:41:18.379558"], ["updated_at", "2015-04-09 14:41:18.379558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:41:18.393473"], ["updated_at", "2015-04-09 14:41:18.393473"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 14:41:18.397725"], ["updated_at", "2015-04-09 14:41:18.397725"]] SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 14:41:18.399725"], ["updated_at", "2015-04-09 14:41:18.399725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 1.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (1.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (1.5ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.1ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.0ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE TABLE "movie_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "fogged_resource_id" integer, "created_at" datetime, "updated_at" datetime)   (1.0ms) CREATE INDEX "index_movie_resources_on_fogged_resource_id" ON "movie_resources" ("fogged_resource_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_resources_on_fogged_resource_id' AND type='index'   (1.0ms) CREATE INDEX "index_movie_resources_on_movie_id" ON "movie_resources" ("movie_id")  (0.9ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:26', '2015-04-09 14:45:26', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:26', '2015-04-09 14:45:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:26', '2015-04-09 14:45:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:26', '2015-04-09 14:45:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:26', '2015-04-09 14:45:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:26', '2015-04-09 14:45:26', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 14:45:26.705104"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:45:26.717218"], ["updated_at", "2015-04-09 14:45:26.717218"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:45:26.723604"], ["updated_at", "2015-04-09 14:45:26.723604"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 14:45:26.724658"], ["updated_at", "2015-04-09 14:45:26.724658"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 14:45:26.725722"], ["updated_at", "2015-04-09 14:45:26.725722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:27', '2015-04-09 14:45:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:45:27.379117"], ["id", 68463692]]  (0.7ms) commit transaction  (0.7ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:45:27.405088"], ["created_at", "2015-04-09 14:45:27.405406"], ["updated_at", "2015-04-09 14:45:27.405406"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:27', '2015-04-09 14:45:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:27', '2015-04-09 14:45:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:27', '2015-04-09 14:45:27', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 14:45:27.984597"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 14:45:37.987798"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 14:45:27'\n updated_at: &6 2015-04-09 14:45:27.984597000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: 255\n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 14:45:27'\n updated_at: '2015-04-09 14:45:27'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 14:45:27'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 14:45:27.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 14:45:28.013444"], ["updated_at", "2015-04-09 14:45:28.013444"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 14:45:28.294749"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 14:45:28.868439"], ["id", 538821867]]  (5.1ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 14:45:38.876547"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 14:45:27'\n updated_at: &6 2015-04-09 14:45:28.868439000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: 255\n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 14:45:27'\n updated_at: '2015-04-09 14:45:28.294749'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 14:45:27'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 14:45:27.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 14:45:28.902883"], ["updated_at", "2015-04-09 14:45:28.902883"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:29', '2015-04-09 14:45:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 16ms (Views: 4.9ms | ActiveRecord: 0.4ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cc56c6d938d3d5e02b13b6a7580e8944"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "cc56c6d938d3d5e02b13b6a7580e8944"], ["created_at", "2015-04-09 14:45:29.150553"], ["updated_at", "2015-04-09 14:45:29.150553"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 14:45:29.153846"], ["updated_at", "2015-04-09 14:45:29.153846"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 14:45:29.244231"], ["updated_at", "2015-04-09 14:45:29.244231"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 14:45:29.250236"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 14:45:29.255651"], ["updated_at", "2015-04-09 14:45:29.255651"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:45:29.259494"], ["updated_at", "2015-04-09 14:45:29.259494"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7f4fbb7216cc92bd8358c5fd215da185"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7f4fbb7216cc92bd8358c5fd215da185"], ["created_at", "2015-04-09 14:45:29.270419"], ["updated_at", "2015-04-09 14:45:29.270419"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c9cbb9a6789cdc634859256cba5548fd"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c9cbb9a6789cdc634859256cba5548fd"], ["created_at", "2015-04-09 14:45:29.273400"], ["updated_at", "2015-04-09 14:45:29.273400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a14f54c313337d02e2cf748c3990dfa2"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a14f54c313337d02e2cf748c3990dfa2"], ["created_at", "2015-04-09 14:45:29.278982"], ["updated_at", "2015-04-09 14:45:29.278982"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b9be20f7772b74bb61bb395c68f425ab"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b9be20f7772b74bb61bb395c68f425ab"], ["created_at", "2015-04-09 14:45:29.282374"], ["updated_at", "2015-04-09 14:45:29.282374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0788f629d53353a5e56d12bfe1e769b9"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0788f629d53353a5e56d12bfe1e769b9"], ["created_at", "2015-04-09 14:45:29.286682"], ["updated_at", "2015-04-09 14:45:29.286682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 14:45:29.293541"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:45:29.385865"], ["id", 68463692]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:45:29.408978"], ["created_at", "2015-04-09 14:45:29.409307"], ["updated_at", "2015-04-09 14:45:29.409307"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:29', '2015-04-09 14:45:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:29', '2015-04-09 14:45:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:29', '2015-04-09 14:45:29', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 591498715) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:42', '2015-04-09 14:45:42', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:42', '2015-04-09 14:45:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:42', '2015-04-09 14:45:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:42', '2015-04-09 14:45:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:42', '2015-04-09 14:45:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:42', '2015-04-09 14:45:42', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:45:58', '2015-04-09 14:45:58', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:58', '2015-04-09 14:45:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:58', '2015-04-09 14:45:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:58', '2015-04-09 14:45:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:45:58', '2015-04-09 14:45:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:45:58', '2015-04-09 14:45:58', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 7ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:46:38', '2015-04-09 14:46:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:38', '2015-04-09 14:46:38', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:38', '2015-04-09 14:46:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:38', '2015-04-09 14:46:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:38', '2015-04-09 14:46:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:46:38', '2015-04-09 14:46:38', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource --------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource --------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:46:58', '2015-04-09 14:46:58', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:58', '2015-04-09 14:46:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:58', '2015-04-09 14:46:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:58', '2015-04-09 14:46:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:46:58', '2015-04-09 14:46:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:46:58', '2015-04-09 14:46:58', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource --------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource --------------------------------------------------------------------  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 819504217) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:47:19', '2015-04-09 14:47:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:19', '2015-04-09 14:47:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:19', '2015-04-09 14:47:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:19', '2015-04-09 14:47:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:19', '2015-04-09 14:47:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:47:19', '2015-04-09 14:47:19', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 11ms (ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:47:49', '2015-04-09 14:47:49', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:49', '2015-04-09 14:47:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:49', '2015-04-09 14:47:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:49', '2015-04-09 14:47:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:47:49', '2015-04-09 14:47:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:47:49', '2015-04-09 14:47:49', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource --------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource --------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:48:38', '2015-04-09 14:48:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 14:48:38.363564"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:48:38.378124"], ["updated_at", "2015-04-09 14:48:38.378124"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:48:38.384847"], ["updated_at", "2015-04-09 14:48:38.384847"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 14:48:38.386038"], ["updated_at", "2015-04-09 14:48:38.386038"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 14:48:38.387731"], ["updated_at", "2015-04-09 14:48:38.387731"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8fcab7712af801c45beabb9492ec74a6"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8fcab7712af801c45beabb9492ec74a6"], ["created_at", "2015-04-09 14:48:38.396724"], ["updated_at", "2015-04-09 14:48:38.396724"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d18fe4d951dcdcd6f3f96eed8da26626"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d18fe4d951dcdcd6f3f96eed8da26626"], ["created_at", "2015-04-09 14:48:38.401243"], ["updated_at", "2015-04-09 14:48:38.401243"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a38a92cfc6935ad9591172015e4f34c9"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a38a92cfc6935ad9591172015e4f34c9"], ["created_at", "2015-04-09 14:48:38.408371"], ["updated_at", "2015-04-09 14:48:38.408371"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a8757bf425de3fe82046d1c7355cc771"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a8757bf425de3fe82046d1c7355cc771"], ["created_at", "2015-04-09 14:48:38.414554"], ["updated_at", "2015-04-09 14:48:38.414554"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6bcc5808eba442081a3bc6425f869a73"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6bcc5808eba442081a3bc6425f869a73"], ["created_at", "2015-04-09 14:48:38.418732"], ["updated_at", "2015-04-09 14:48:38.418732"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 14:48:38.431180"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:48:38.549453"], ["id", 68463692]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:48:38.571666"], ["created_at", "2015-04-09 14:48:38.572038"], ["updated_at", "2015-04-09 14:48:38.572038"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:48:38', '2015-04-09 14:48:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:38', '2015-04-09 14:48:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:48:38', '2015-04-09 14:48:38', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2d82a6d279c20331eec059d672cfc08a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "2d82a6d279c20331eec059d672cfc08a"], ["created_at", "2015-04-09 14:48:38.750878"], ["updated_at", "2015-04-09 14:48:38.750878"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 14:48:38.791579"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 14:48:38.803029"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:48:38.911600"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:48:38.932183"], ["created_at", "2015-04-09 14:48:38.932488"], ["updated_at", "2015-04-09 14:48:38.932488"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.4ms) commit transaction Completed 200 OK in 33ms (Views: 2.9ms | ActiveRecord: 3.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:48:39', '2015-04-09 14:48:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:39', '2015-04-09 14:48:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:39', '2015-04-09 14:48:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:39', '2015-04-09 14:48:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:39', '2015-04-09 14:48:39', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:48:39', '2015-04-09 14:48:39', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 19ms (Views: 5.1ms | ActiveRecord: 0.6ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0882e41ac9e0e62ff85cf95f7a814c90"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "0882e41ac9e0e62ff85cf95f7a814c90"], ["created_at", "2015-04-09 14:48:39.153035"], ["updated_at", "2015-04-09 14:48:39.153035"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 14:48:39.156294"], ["updated_at", "2015-04-09 14:48:39.156294"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 14:48:39.194562"], ["updated_at", "2015-04-09 14:48:39.194562"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 14:48:39.199527"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 14:48:39.203759"], ["updated_at", "2015-04-09 14:48:39.203759"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 14:48:39.206622"], ["updated_at", "2015-04-09 14:48:39.206622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 14:48:39.326593"], ["id", 538821867]]  (0.8ms) commit transaction  (0.3ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 14:48:49.331399"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 14:48:39'\n updated_at: &6 2015-04-09 14:48:39.326593000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: 255\n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 14:48:39'\n updated_at: '2015-04-09 14:48:39'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 14:48:39'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 14:48:39.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 14:48:39.365420"], ["updated_at", "2015-04-09 14:48:39.365420"]]  (7.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 14:48:39.665456"], ["id", 538821867]]  (0.7ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 14:48:40.133705"], ["id", 538821867]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 14:48:50.142536"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 14:48:39'\n updated_at: &6 2015-04-09 14:48:40.133705000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: 255\n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 14:48:39'\n updated_at: '2015-04-09 14:48:39.665456'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 14:48:39'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 14:48:39.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 14:48:40.172926"], ["updated_at", "2015-04-09 14:48:40.172926"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:48:40', '2015-04-09 14:48:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:40', '2015-04-09 14:48:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:40', '2015-04-09 14:48:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:40', '2015-04-09 14:48:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:40', '2015-04-09 14:48:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:48:40', '2015-04-09 14:48:40', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 14:48:40.542225"], ["id", 68463692]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 14:48:40.565160"], ["created_at", "2015-04-09 14:48:40.565653"], ["updated_at", "2015-04-09 14:48:40.565653"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 14:48:41', '2015-04-09 14:48:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:41', '2015-04-09 14:48:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:41', '2015-04-09 14:48:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:41', '2015-04-09 14:48:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 14:48:41', '2015-04-09 14:48:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 14:48:41', '2015-04-09 14:48:41', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (5.0ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (1.4ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.5ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.9ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.1ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.9ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.4ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.6ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (2.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (2.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.3ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.8ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.5ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (1.0ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.3ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.4ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.7ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (1.0ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.7ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (1.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.4ms) SELECT version FROM "schema_migrations"  (1.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (1.4ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.0ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.1ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.8ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (1.0ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.8ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.3ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.0ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.1ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.7ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.4ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (1.3ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (1.0ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (1.0ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (1.1ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.2ms) select sqlite_version(*)  (1.0ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.0ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.8ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.9ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (1.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.8ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (7.4ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (1.5ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.1ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.9ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (1.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.9ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (6.9ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.3ms) select sqlite_version(*)  (1.5ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.3ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (2.2ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (2.0ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (1.2ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (1.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (1.0ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (2.3ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (1.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (1.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (2.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (5.1ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.8ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.7ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.6ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.6ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.7ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20150409150120')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345')  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateFoggedResources (20141103143408)  (0.1ms) begin transaction  (0.1ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  SQLite3::SQLException: table "fogged_resources" already exists: CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.0ms) rollback transaction  (5.4ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateFoggedResources (20141103143408)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141103143408"]]  (0.8ms) commit transaction Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.4ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.7ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.6ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.2ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (1.1ms) commit transaction Migrating to CreateDelayedJobs (20141105073909)  (0.1ms) begin transaction  (0.7ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)  (0.3ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141105073909"]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:07:17', '2015-04-09 15:07:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:17', '2015-04-09 15:07:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:17', '2015-04-09 15:07:17', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:17', '2015-04-09 15:07:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:17', '2015-04-09 15:07:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:07:17', '2015-04-09 15:07:17', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:07:17.344056"], ["id", 538821867]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:07:27.351454"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:07:17'\n updated_at: &6 2015-04-09 15:07:17.344056000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:07:17'\n updated_at: '2015-04-09 15:07:17'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:07:17'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:07:17.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:07:17.381105"], ["updated_at", "2015-04-09 15:07:17.381105"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:07:17.691250"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:07:18.300263"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:07:28.307220"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:07:17'\n updated_at: &6 2015-04-09 15:07:18.300263000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:07:17'\n updated_at: '2015-04-09 15:07:17.691250'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:07:17'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:07:17.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:07:18.339240"], ["updated_at", "2015-04-09 15:07:18.339240"]]  (1.5ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:07:18', '2015-04-09 15:07:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:18', '2015-04-09 15:07:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:18', '2015-04-09 15:07:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:18', '2015-04-09 15:07:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:18', '2015-04-09 15:07:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:07:18', '2015-04-09 15:07:18', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 4ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.9ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8da5abf8a09ee826ee669b0ae4297fd9"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "8da5abf8a09ee826ee669b0ae4297fd9"], ["created_at", "2015-04-09 15:07:18.633912"], ["updated_at", "2015-04-09 15:07:18.633912"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.6ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 14ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 1.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:07:18.714187"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.0ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:07:18.853817"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:07:18.918570"], ["created_at", "2015-04-09 15:07:18.918876"], ["updated_at", "2015-04-09 15:07:18.918876"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 78ms (Views: 2.8ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:07:19', '2015-04-09 15:07:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:07:19.145475"], ["updated_at", "2015-04-09 15:07:19.145475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:07:19.150556"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:07:19.157992"], ["updated_at", "2015-04-09 15:07:19.157992"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:07:19.163400"], ["updated_at", "2015-04-09 15:07:19.163400"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 30ms (Views: 3.6ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ca70bdfd7c290b659cd6b6954630a682"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "ca70bdfd7c290b659cd6b6954630a682"], ["created_at", "2015-04-09 15:07:19.280965"], ["updated_at", "2015-04-09 15:07:19.280965"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (1.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:07:19.287672"], ["updated_at", "2015-04-09 15:07:19.287672"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.5ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 3.9ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 3ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:07:19.348360"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:07:19.355888"], ["updated_at", "2015-04-09 15:07:19.355888"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:07:19.370644"], ["updated_at", "2015-04-09 15:07:19.370644"]] SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:07:19.372503"], ["updated_at", "2015-04-09 15:07:19.372503"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:07:19.375437"], ["updated_at", "2015-04-09 15:07:19.375437"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "53b713141a8b67e4d998723fc0ec15e0"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "53b713141a8b67e4d998723fc0ec15e0"], ["created_at", "2015-04-09 15:07:19.382308"], ["updated_at", "2015-04-09 15:07:19.382308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "403842e3ad6fd7aa683c8349c10b5fa7"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "403842e3ad6fd7aa683c8349c10b5fa7"], ["created_at", "2015-04-09 15:07:19.387118"], ["updated_at", "2015-04-09 15:07:19.387118"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.4ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "02b31f6415ac2753e9dd134d4c31e3da"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "02b31f6415ac2753e9dd134d4c31e3da"], ["created_at", "2015-04-09 15:07:19.403547"], ["updated_at", "2015-04-09 15:07:19.403547"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "df1c0f58118f15c1cdbdfa81d438d878"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "df1c0f58118f15c1cdbdfa81d438d878"], ["created_at", "2015-04-09 15:07:19.409701"], ["updated_at", "2015-04-09 15:07:19.409701"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "07d598aeb5bc28b8f0ccd7476bfb9782"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "07d598aeb5bc28b8f0ccd7476bfb9782"], ["created_at", "2015-04-09 15:07:19.418032"], ["updated_at", "2015-04-09 15:07:19.418032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:07:19.429124"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:07:19.538928"], ["id", 68463692]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (1.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:07:19.559275"], ["created_at", "2015-04-09 15:07:19.560154"], ["updated_at", "2015-04-09 15:07:19.560154"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:07:19', '2015-04-09 15:07:19', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:19', '2015-04-09 15:07:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:07:19', '2015-04-09 15:07:19', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:07:19.878220"], ["id", 68463692]]  (0.6ms) commit transaction  (0.2ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:07:19.898844"], ["created_at", "2015-04-09 15:07:19.899727"], ["updated_at", "2015-04-09 15:07:19.899727"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:07:20', '2015-04-09 15:07:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:20', '2015-04-09 15:07:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:20', '2015-04-09 15:07:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:20', '2015-04-09 15:07:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:07:20', '2015-04-09 15:07:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:07:20', '2015-04-09 15:07:20', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:07:20.362468"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.3ms | ActiveRecord: 1.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:20', '2015-04-09 15:08:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:20', '2015-04-09 15:08:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:20', '2015-04-09 15:08:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:20', '2015-04-09 15:08:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:20', '2015-04-09 15:08:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:20', '2015-04-09 15:08:20', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 0.7ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.9ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:08:20.881064"], ["id", 538821867]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:08:30.886308"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:08:20'\n updated_at: &6 2015-04-09 15:08:20.881064000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:08:20'\n updated_at: '2015-04-09 15:08:20'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:08:20'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:08:20.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:08:20.916825"], ["updated_at", "2015-04-09 15:08:20.916825"]]  (1.2ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:08:21.225390"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:08:21.811546"], ["id", 538821867]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:08:31.821192"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:08:20'\n updated_at: &6 2015-04-09 15:08:21.811546000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:08:20'\n updated_at: '2015-04-09 15:08:21.225390'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:08:20'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:08:20.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:08:21.855805"], ["updated_at", "2015-04-09 15:08:21.855805"]]  (1.2ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:22', '2015-04-09 15:08:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 29ms (Views: 26.9ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:08:22.134442"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:08:22.148720"], ["updated_at", "2015-04-09 15:08:22.148720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:08:22.160389"], ["updated_at", "2015-04-09 15:08:22.160389"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:08:22.163691"], ["updated_at", "2015-04-09 15:08:22.163691"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:08:22.165512"], ["updated_at", "2015-04-09 15:08:22.165512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "368bdc81e634446f14986cf8c0549e7a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "368bdc81e634446f14986cf8c0549e7a"], ["created_at", "2015-04-09 15:08:22.177150"], ["updated_at", "2015-04-09 15:08:22.177150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7977ed743540fa32ea7c6b8a334c57fb"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7977ed743540fa32ea7c6b8a334c57fb"], ["created_at", "2015-04-09 15:08:22.181434"], ["updated_at", "2015-04-09 15:08:22.181434"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fad5807c18c6692fe9705197b3731773"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fad5807c18c6692fe9705197b3731773"], ["created_at", "2015-04-09 15:08:22.194072"], ["updated_at", "2015-04-09 15:08:22.194072"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "28bc9fece0841e574192706c801724fb"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "28bc9fece0841e574192706c801724fb"], ["created_at", "2015-04-09 15:08:22.200479"], ["updated_at", "2015-04-09 15:08:22.200479"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e8c8854be2d7b36dd62bb20b1ef38fdb"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e8c8854be2d7b36dd62bb20b1ef38fdb"], ["created_at", "2015-04-09 15:08:22.209089"], ["updated_at", "2015-04-09 15:08:22.209089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:08:22.218896"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:08:22.314445"], ["id", 68463692]]  (0.7ms) commit transaction  (0.3ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:08:22.337371"], ["created_at", "2015-04-09 15:08:22.338262"], ["updated_at", "2015-04-09 15:08:22.338262"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:22', '2015-04-09 15:08:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "78f85c72cc48cd7fb3174632d3b7d34e"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "78f85c72cc48cd7fb3174632d3b7d34e"], ["created_at", "2015-04-09 15:08:22.549386"], ["updated_at", "2015-04-09 15:08:22.549386"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:08:22.557018"], ["updated_at", "2015-04-09 15:08:22.557018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:08:22.589767"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.8ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:08:22.733675"], ["id", 68463692]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:08:22.759048"], ["created_at", "2015-04-09 15:08:22.759498"], ["updated_at", "2015-04-09 15:08:22.759498"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 43ms (Views: 5.0ms | ActiveRecord: 4.3ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 591498715) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:22', '2015-04-09 15:08:22', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:22', '2015-04-09 15:08:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:22', '2015-04-09 15:08:22', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:08:22.950054"], ["updated_at", "2015-04-09 15:08:22.950054"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:08:22.956857"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:08:22.963589"], ["updated_at", "2015-04-09 15:08:22.963589"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:08:22.966518"], ["updated_at", "2015-04-09 15:08:22.966518"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:08:22.980432"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 4.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:08:23.136266"], ["id", 68463692]]  (0.7ms) commit transaction  (0.3ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:08:23.165554"], ["created_at", "2015-04-09 15:08:23.165868"], ["updated_at", "2015-04-09 15:08:23.165868"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:23', '2015-04-09 15:08:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:23', '2015-04-09 15:08:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:23', '2015-04-09 15:08:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:23', '2015-04-09 15:08:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:23', '2015-04-09 15:08:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:23', '2015-04-09 15:08:23', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dc5d7886c1ede3dd651a72fc90821848"]] SQL (0.9ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "dc5d7886c1ede3dd651a72fc90821848"], ["created_at", "2015-04-09 15:08:23.587682"], ["updated_at", "2015-04-09 15:08:23.587682"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.2ms | ActiveRecord: 1.5ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:47', '2015-04-09 15:08:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8900151f27639aea56e187e63aeb7df1"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8900151f27639aea56e187e63aeb7df1"], ["created_at", "2015-04-09 15:08:47.043595"], ["updated_at", "2015-04-09 15:08:47.043595"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5b9004cf3aced3780f5a16444e3cd905"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5b9004cf3aced3780f5a16444e3cd905"], ["created_at", "2015-04-09 15:08:47.049704"], ["updated_at", "2015-04-09 15:08:47.049704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0f844f7e6e996a142cf57aecf5145b3a"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0f844f7e6e996a142cf57aecf5145b3a"], ["created_at", "2015-04-09 15:08:47.061249"], ["updated_at", "2015-04-09 15:08:47.061249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "951604dff295dda0a1a8de7fcc554b15"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "951604dff295dda0a1a8de7fcc554b15"], ["created_at", "2015-04-09 15:08:47.064887"], ["updated_at", "2015-04-09 15:08:47.064887"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8947ff88f415de4ca1b24bb5439ed801"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8947ff88f415de4ca1b24bb5439ed801"], ["created_at", "2015-04-09 15:08:47.069668"], ["updated_at", "2015-04-09 15:08:47.069668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:08:47.092292"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:08:47.205927"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:08:47.228692"], ["created_at", "2015-04-09 15:08:47.228995"], ["updated_at", "2015-04-09 15:08:47.228995"]]  (1.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:47', '2015-04-09 15:08:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:47', '2015-04-09 15:08:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:47', '2015-04-09 15:08:47', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 5ms (Views: 3.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:08:47.593767"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:08:57.597657"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:08:47'\n updated_at: &6 2015-04-09 15:08:47.593767000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:08:47'\n updated_at: '2015-04-09 15:08:47'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:08:47'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:08:47.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:08:47.625094"], ["updated_at", "2015-04-09 15:08:47.625094"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:08:47.919952"], ["id", 538821867]]  (0.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:08:48.519321"], ["id", 538821867]]  (4.9ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:08:58.527181"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:08:47'\n updated_at: &6 2015-04-09 15:08:48.519321000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:08:47'\n updated_at: '2015-04-09 15:08:47.919952'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:08:47'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:08:47.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:08:48.565178"], ["updated_at", "2015-04-09 15:08:48.565178"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:48', '2015-04-09 15:08:48', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:48', '2015-04-09 15:08:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:48', '2015-04-09 15:08:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:48', '2015-04-09 15:08:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:48', '2015-04-09 15:08:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:48', '2015-04-09 15:08:48', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:08:48.794898"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:08:48.927012"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:08:48.991966"], ["created_at", "2015-04-09 15:08:48.992267"], ["updated_at", "2015-04-09 15:08:48.992267"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:49', '2015-04-09 15:08:49', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:49', '2015-04-09 15:08:49', 419883833, 624739301, 701625837) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:49', '2015-04-09 15:08:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:49', '2015-04-09 15:08:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:49', '2015-04-09 15:08:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:49', '2015-04-09 15:08:49', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:08:49.479511"], ["updated_at", "2015-04-09 15:08:49.479511"]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:08:49.487773"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:08:49.496641"], ["updated_at", "2015-04-09 15:08:49.496641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:08:49.501835"], ["updated_at", "2015-04-09 15:08:49.501835"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "34dae5ff13475e0f949ca86a67388216"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "34dae5ff13475e0f949ca86a67388216"], ["created_at", "2015-04-09 15:08:49.510018"], ["updated_at", "2015-04-09 15:08:49.510018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.6ms | ActiveRecord: 0.6ms)  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie ---------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name -----------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id -------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:08:49.650708"], ["id", 431685987]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:08:49.660364"], ["updated_at", "2015-04-09 15:08:49.660364"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:08:49.668738"], ["updated_at", "2015-04-09 15:08:49.668738"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:08:49.670251"], ["updated_at", "2015-04-09 15:08:49.670251"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:08:49.671921"], ["updated_at", "2015-04-09 15:08:49.671921"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:08:49.682739"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.6ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:08:49.806696"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:08:49.830670"], ["created_at", "2015-04-09 15:08:49.831000"], ["updated_at", "2015-04-09 15:08:49.831000"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 39ms (Views: 4.0ms | ActiveRecord: 3.6ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:08:50', '2015-04-09 15:08:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:50', '2015-04-09 15:08:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:50', '2015-04-09 15:08:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:50', '2015-04-09 15:08:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:08:50', '2015-04-09 15:08:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:08:50', '2015-04-09 15:08:50', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:09:12', '2015-04-09 15:09:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "69d765f07d8944d9f717e239bd43adc4"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "69d765f07d8944d9f717e239bd43adc4"], ["created_at", "2015-04-09 15:09:12.093686"], ["updated_at", "2015-04-09 15:09:12.093686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "81055c7d7ed60200c4398b21f134ea3c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "81055c7d7ed60200c4398b21f134ea3c"], ["created_at", "2015-04-09 15:09:12.099852"], ["updated_at", "2015-04-09 15:09:12.099852"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "44f87aea2553034711abe43af03de0ec"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "44f87aea2553034711abe43af03de0ec"], ["created_at", "2015-04-09 15:09:12.107489"], ["updated_at", "2015-04-09 15:09:12.107489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "471bf708e52b8c33a76cc2f4e42372db"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "471bf708e52b8c33a76cc2f4e42372db"], ["created_at", "2015-04-09 15:09:12.111088"], ["updated_at", "2015-04-09 15:09:12.111088"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bb513dbf9f9a09402ac44e2dcce3bdf5"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bb513dbf9f9a09402ac44e2dcce3bdf5"], ["created_at", "2015-04-09 15:09:12.115121"], ["updated_at", "2015-04-09 15:09:12.115121"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:09:12.129152"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:09:12.270402"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:09:12.290989"], ["created_at", "2015-04-09 15:09:12.291394"], ["updated_at", "2015-04-09 15:09:12.291394"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:09:12', '2015-04-09 15:09:12', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:12', '2015-04-09 15:09:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:09:12', '2015-04-09 15:09:12', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie ---------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name -----------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id -------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:09:12.537351"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:09:12.544288"], ["updated_at", "2015-04-09 15:09:12.544288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:09:12.550456"], ["updated_at", "2015-04-09 15:09:12.550456"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:09:12.552427"], ["updated_at", "2015-04-09 15:09:12.552427"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:09:12.554246"], ["updated_at", "2015-04-09 15:09:12.554246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:09:12.659258"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:09:22.664060"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:09:12'\n updated_at: &6 2015-04-09 15:09:12.659258000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:09:12'\n updated_at: '2015-04-09 15:09:12'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:09:12'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:09:12.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:09:12.696919"], ["updated_at", "2015-04-09 15:09:12.696919"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:09:12.934420"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:09:13.429539"], ["id", 538821867]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:09:23.438196"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:09:12'\n updated_at: &6 2015-04-09 15:09:13.429539000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:09:12'\n updated_at: '2015-04-09 15:09:12.934420'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:09:12'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:09:12.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:09:13.470450"], ["updated_at", "2015-04-09 15:09:13.470450"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 68463692) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:09:13', '2015-04-09 15:09:13', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:13', '2015-04-09 15:09:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:13', '2015-04-09 15:09:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:13', '2015-04-09 15:09:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:13', '2015-04-09 15:09:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:09:13', '2015-04-09 15:09:13', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:09:13.653071"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:09:13.763024"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:09:13.782898"], ["created_at", "2015-04-09 15:09:13.783257"], ["updated_at", "2015-04-09 15:09:13.783257"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:09:14', '2015-04-09 15:09:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:14', '2015-04-09 15:09:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:14', '2015-04-09 15:09:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:14', '2015-04-09 15:09:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:09:14', '2015-04-09 15:09:14', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:09:14', '2015-04-09 15:09:14', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:09:23.073950"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.1ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (4.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:04', '2015-04-09 15:10:04', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 948421225)  (5.3ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "21f7f5410ae98bba2882b98c9d8484b9"]] SQL (2.0ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "21f7f5410ae98bba2882b98c9d8484b9"], ["created_at", "2015-04-09 15:10:04.324823"], ["updated_at", "2015-04-09 15:10:04.324823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32ms (Views: 1.8ms | ActiveRecord: 2.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 14ms (ActiveRecord: 0.4ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ce74f9aac21734de8610cc78b23b8f02"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ce74f9aac21734de8610cc78b23b8f02"], ["created_at", "2015-04-09 15:10:04.379244"], ["updated_at", "2015-04-09 15:10:04.379244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "29bd822094697355b0e140f0c4fb48a9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "29bd822094697355b0e140f0c4fb48a9"], ["created_at", "2015-04-09 15:10:04.384217"], ["updated_at", "2015-04-09 15:10:04.384217"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a3108272e77306e553b62ba12caf59b2"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a3108272e77306e553b62ba12caf59b2"], ["created_at", "2015-04-09 15:10:04.389940"], ["updated_at", "2015-04-09 15:10:04.389940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9f4a8431da3c9ca91bd0f9d8bc5cf36a"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9f4a8431da3c9ca91bd0f9d8bc5cf36a"], ["created_at", "2015-04-09 15:10:04.395272"], ["updated_at", "2015-04-09 15:10:04.395272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "25fbd41bd0811debd3f9aaea75dbd907"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "25fbd41bd0811debd3f9aaea75dbd907"], ["created_at", "2015-04-09 15:10:04.403453"], ["updated_at", "2015-04-09 15:10:04.403453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:10:04.418096"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:10:04.534302"], ["id", 68463692]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:10:04.565837"], ["created_at", "2015-04-09 15:10:04.566710"], ["updated_at", "2015-04-09 15:10:04.566710"]]  (1.6ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:04', '2015-04-09 15:10:04', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:04', '2015-04-09 15:10:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:04', '2015-04-09 15:10:04', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:10:04.818364"], ["updated_at", "2015-04-09 15:10:04.818364"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:10:04.828432"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:10:04.835503"], ["updated_at", "2015-04-09 15:10:04.835503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:10:04.840693"], ["updated_at", "2015-04-09 15:10:04.840693"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 41ms (Views: 5.0ms | ActiveRecord: 0.7ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a3d4e64a133c89896a907127521eecd1"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "a3d4e64a133c89896a907127521eecd1"], ["created_at", "2015-04-09 15:10:04.912677"], ["updated_at", "2015-04-09 15:10:04.912677"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:10:04.920367"], ["updated_at", "2015-04-09 15:10:04.920367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 0.8ms)  (1.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 39ms (Views: 3.1ms | ActiveRecord: 0.6ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:10:05.086456"], ["id", 538821867]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:10:15.090178"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:10:04'\n updated_at: &6 2015-04-09 15:10:05.086456000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:10:04'\n updated_at: '2015-04-09 15:10:04'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:10:04'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:10:04.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:10:05.121101"], ["updated_at", "2015-04-09 15:10:05.121101"]]  (1.7ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:10:05.407278"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:10:05.953971"], ["id", 538821867]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:10:15.962138"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:10:04'\n updated_at: &6 2015-04-09 15:10:05.953971000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:10:04'\n updated_at: '2015-04-09 15:10:05.407278'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:10:04'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:10:04.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:10:05.993368"], ["updated_at", "2015-04-09 15:10:05.993368"]]  (1.8ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:06', '2015-04-09 15:10:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:10:06.343493"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:10:06.367384"], ["created_at", "2015-04-09 15:10:06.367693"], ["updated_at", "2015-04-09 15:10:06.367693"]]  (0.8ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:06', '2015-04-09 15:10:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:06', '2015-04-09 15:10:06', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:06', '2015-04-09 15:10:06', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:10:06.820997"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:10:06.827624"], ["updated_at", "2015-04-09 15:10:06.827624"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:10:06.838475"], ["updated_at", "2015-04-09 15:10:06.838475"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:10:06.841974"], ["updated_at", "2015-04-09 15:10:06.841974"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:10:06.846276"], ["updated_at", "2015-04-09 15:10:06.846276"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:10:06.864148"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:10:06.878863"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.5ms | ActiveRecord: 1.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:10:07.002419"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:10:07.023472"], ["created_at", "2015-04-09 15:10:07.023770"], ["updated_at", "2015-04-09 15:10:07.023770"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 38ms (Views: 5.9ms | ActiveRecord: 3.3ms)  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:46', '2015-04-09 15:10:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:10:46.398016"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 19ms (Views: 3.2ms | ActiveRecord: 1.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:10:46.535843"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:10:46.556957"], ["created_at", "2015-04-09 15:10:46.557918"], ["updated_at", "2015-04-09 15:10:46.557918"]]  (1.0ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 39ms (Views: 5.1ms | ActiveRecord: 3.7ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:46', '2015-04-09 15:10:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:46', '2015-04-09 15:10:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:46', '2015-04-09 15:10:46', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "45ee528af46ef7cd36a4030ffd3ee31d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "45ee528af46ef7cd36a4030ffd3ee31d"], ["created_at", "2015-04-09 15:10:46.792026"], ["updated_at", "2015-04-09 15:10:46.792026"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a99d2d26e2d1139ea55d09557dbcd40f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a99d2d26e2d1139ea55d09557dbcd40f"], ["created_at", "2015-04-09 15:10:46.795372"], ["updated_at", "2015-04-09 15:10:46.795372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "affc0fec5813ca3ef73e660abd3358bd"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "affc0fec5813ca3ef73e660abd3358bd"], ["created_at", "2015-04-09 15:10:46.800789"], ["updated_at", "2015-04-09 15:10:46.800789"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1e422fbd8c5201b92a1b0ff70922c331"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1e422fbd8c5201b92a1b0ff70922c331"], ["created_at", "2015-04-09 15:10:46.803517"], ["updated_at", "2015-04-09 15:10:46.803517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d0ccb77a0fdc011e483ee9426670faa1"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d0ccb77a0fdc011e483ee9426670faa1"], ["created_at", "2015-04-09 15:10:46.808023"], ["updated_at", "2015-04-09 15:10:46.808023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:10:46.823951"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:10:46.929550"], ["id", 68463692]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:10:46.953483"], ["created_at", "2015-04-09 15:10:46.953777"], ["updated_at", "2015-04-09 15:10:46.953777"]]  (0.8ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:47', '2015-04-09 15:10:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:47', '2015-04-09 15:10:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:47', '2015-04-09 15:10:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:47', '2015-04-09 15:10:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:47', '2015-04-09 15:10:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:47', '2015-04-09 15:10:47', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "342c2c74766175b7f6f9a7bdb019a4e1"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "342c2c74766175b7f6f9a7bdb019a4e1"], ["created_at", "2015-04-09 15:10:47.183290"], ["updated_at", "2015-04-09 15:10:47.183290"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:10:47.256371"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:10:47.265521"], ["updated_at", "2015-04-09 15:10:47.265521"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:10:47.298917"], ["updated_at", "2015-04-09 15:10:47.298917"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:10:47.300153"], ["updated_at", "2015-04-09 15:10:47.300153"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:10:47.301245"], ["updated_at", "2015-04-09 15:10:47.301245"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 18ms (Views: 5.8ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5ce62811cfff3e44faeace646a94eedd"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "5ce62811cfff3e44faeace646a94eedd"], ["created_at", "2015-04-09 15:10:47.353037"], ["updated_at", "2015-04-09 15:10:47.353037"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:10:47.356973"], ["updated_at", "2015-04-09 15:10:47.356973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:10:47.394515"], ["updated_at", "2015-04-09 15:10:47.394515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:10:47.401094"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:10:47.406130"], ["updated_at", "2015-04-09 15:10:47.406130"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:10:47.409997"], ["updated_at", "2015-04-09 15:10:47.409997"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:10:47.539348"], ["id", 538821867]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:10:57.543118"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:10:47'\n updated_at: &6 2015-04-09 15:10:47.539348000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:10:47'\n updated_at: '2015-04-09 15:10:47'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:10:47'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:10:47.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:10:47.567855"], ["updated_at", "2015-04-09 15:10:47.567855"]]  (1.2ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:10:47.837022"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:10:48.536325"], ["id", 538821867]]  (5.7ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:10:58.549488"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:10:47'\n updated_at: &6 2015-04-09 15:10:48.536325000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:10:47'\n updated_at: '2015-04-09 15:10:47.837022'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:10:47'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:10:47.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:10:48.587670"], ["updated_at", "2015-04-09 15:10:48.587670"]]  (1.6ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:10:48', '2015-04-09 15:10:48', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:48', '2015-04-09 15:10:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:48', '2015-04-09 15:10:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:48', '2015-04-09 15:10:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:10:48', '2015-04-09 15:10:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:10:48', '2015-04-09 15:10:48', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:10:48.842377"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:10:48.954186"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:10:48.978571"], ["created_at", "2015-04-09 15:10:48.978868"], ["updated_at", "2015-04-09 15:10:48.978868"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:11:17', '2015-04-09 15:11:17', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:17', '2015-04-09 15:11:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:17', '2015-04-09 15:11:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:17', '2015-04-09 15:11:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:17', '2015-04-09 15:11:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:11:17', '2015-04-09 15:11:17', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.6ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2d481b332c2c8cea709c383d53de7c88"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "2d481b332c2c8cea709c383d53de7c88"], ["created_at", "2015-04-09 15:11:17.650462"], ["updated_at", "2015-04-09 15:11:17.650462"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 36ms (Views: 4.2ms | ActiveRecord: 1.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:11:17.734932"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:11:17.742832"], ["updated_at", "2015-04-09 15:11:17.742832"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:11:17.762642"], ["updated_at", "2015-04-09 15:11:17.762642"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:11:17.764832"], ["updated_at", "2015-04-09 15:11:17.764832"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:11:17.766896"], ["updated_at", "2015-04-09 15:11:17.766896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 22ms (Views: 5.6ms | ActiveRecord: 0.7ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.3ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c96297a1bf40148d1a0b1fb8b668d148"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "c96297a1bf40148d1a0b1fb8b668d148"], ["created_at", "2015-04-09 15:11:17.829539"], ["updated_at", "2015-04-09 15:11:17.829539"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:11:17.834459"], ["updated_at", "2015-04-09 15:11:17.834459"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.4ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "46302df853312230a0fceef636c43df7"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "46302df853312230a0fceef636c43df7"], ["created_at", "2015-04-09 15:11:17.877693"], ["updated_at", "2015-04-09 15:11:17.877693"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a6825804d783ac5c5f8703d332d4b471"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a6825804d783ac5c5f8703d332d4b471"], ["created_at", "2015-04-09 15:11:17.883490"], ["updated_at", "2015-04-09 15:11:17.883490"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b4b288108431e46a9a295c1799fdbd6d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b4b288108431e46a9a295c1799fdbd6d"], ["created_at", "2015-04-09 15:11:17.888466"], ["updated_at", "2015-04-09 15:11:17.888466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0739f7929d77c3eed98973b6485c2b6b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0739f7929d77c3eed98973b6485c2b6b"], ["created_at", "2015-04-09 15:11:17.891157"], ["updated_at", "2015-04-09 15:11:17.891157"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f7873148c224711b06dfedd458760f08"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f7873148c224711b06dfedd458760f08"], ["created_at", "2015-04-09 15:11:17.895123"], ["updated_at", "2015-04-09 15:11:17.895123"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:11:17.903747"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:11:18.001490"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:11:18.021390"], ["created_at", "2015-04-09 15:11:18.021697"], ["updated_at", "2015-04-09 15:11:18.021697"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:11:18', '2015-04-09 15:11:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:11:18.330747"], ["id", 68463692]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:11:18.354886"], ["created_at", "2015-04-09 15:11:18.355673"], ["updated_at", "2015-04-09 15:11:18.355673"]]  (1.3ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:11:18', '2015-04-09 15:11:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:18', '2015-04-09 15:11:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:11:18', '2015-04-09 15:11:18', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:11:18.830755"], ["updated_at", "2015-04-09 15:11:18.830755"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:11:18.839323"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:11:18.849041"], ["updated_at", "2015-04-09 15:11:18.849041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:11:18.853453"], ["updated_at", "2015-04-09 15:11:18.853453"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:11:18.952968"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:11:28.956241"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:11:18'\n updated_at: &6 2015-04-09 15:11:18.952968000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:11:18'\n updated_at: '2015-04-09 15:11:18'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:11:18'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:11:18.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:11:18.981447"], ["updated_at", "2015-04-09 15:11:18.981447"]]  (1.2ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:11:19.244660"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:11:19.782328"], ["id", 538821867]]  (4.9ms) commit transaction  (0.2ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:11:29.789759"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:11:18'\n updated_at: &6 2015-04-09 15:11:19.782328000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:11:18'\n updated_at: '2015-04-09 15:11:19.244660'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:11:18'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:11:18.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:11:19.821870"], ["updated_at", "2015-04-09 15:11:19.821870"]]  (1.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:11:20', '2015-04-09 15:11:20', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:20', '2015-04-09 15:11:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:20', '2015-04-09 15:11:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:20', '2015-04-09 15:11:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:11:20', '2015-04-09 15:11:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:11:20', '2015-04-09 15:11:20', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 4ms (Views: 3.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.6ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:11:20.084693"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:11:20.100486"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:11:20.231039"], ["id", 68463692]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:11:20.251985"], ["created_at", "2015-04-09 15:11:20.252381"], ["updated_at", "2015-04-09 15:11:20.252381"]]  (0.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 34ms (Views: 4.5ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (5.2ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (0.7ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (0.7ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.7ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (1.2ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (1.0ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.1ms) SELECT version FROM "schema_migrations"  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (0.6ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (1.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateFoggedResources (20141103143408)  (0.1ms) begin transaction  (0.5ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.2ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141103143408"]]  (0.8ms) commit transaction Migrating to CreateImages (20141104135257)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.8ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)  SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (0.7ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.0ms) begin transaction  (0.2ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.7ms) commit transaction Migrating to CreateDelayedJobs (20141105073909)  (0.0ms) begin transaction  (0.3ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)  (0.1ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141105073909"]]  (0.6ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.2ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:05', '2015-04-09 15:13:05', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 948421225)  (5.2ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:05.361703"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:05.383801"], ["created_at", "2015-04-09 15:13:05.384206"], ["updated_at", "2015-04-09 15:13:05.384206"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:05', '2015-04-09 15:13:05', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:05', '2015-04-09 15:13:05', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:05', '2015-04-09 15:13:05', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "573ffe9988ee9908bc65d51ef998dcf9"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "573ffe9988ee9908bc65d51ef998dcf9"], ["created_at", "2015-04-09 15:13:05.887244"], ["updated_at", "2015-04-09 15:13:05.887244"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7fb67dc8a9b5db3436c9eaf7fc2c3b66"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7fb67dc8a9b5db3436c9eaf7fc2c3b66"], ["created_at", "2015-04-09 15:13:05.893499"], ["updated_at", "2015-04-09 15:13:05.893499"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b26c3cfb009b95de34f8cdf4d61b3c58"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b26c3cfb009b95de34f8cdf4d61b3c58"], ["created_at", "2015-04-09 15:13:05.901588"], ["updated_at", "2015-04-09 15:13:05.901588"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c8873b9b16c28c37229a4acbb9fd6bf5"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c8873b9b16c28c37229a4acbb9fd6bf5"], ["created_at", "2015-04-09 15:13:05.905624"], ["updated_at", "2015-04-09 15:13:05.905624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8890bb86384920a7bea3e8925dcb74db"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8890bb86384920a7bea3e8925dcb74db"], ["created_at", "2015-04-09 15:13:05.912307"], ["updated_at", "2015-04-09 15:13:05.912307"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:13:05.928547"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:06.028100"], ["id", 68463692]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:06.051006"], ["created_at", "2015-04-09 15:13:06.051340"], ["updated_at", "2015-04-09 15:13:06.051340"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 68463692) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:06', '2015-04-09 15:13:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:13:06.300512"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:06.308304"], ["updated_at", "2015-04-09 15:13:06.308304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:06.320158"], ["updated_at", "2015-04-09 15:13:06.320158"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:13:06.323330"], ["updated_at", "2015-04-09 15:13:06.323330"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:13:06.325613"], ["updated_at", "2015-04-09 15:13:06.325613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:13:06.340203"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.7ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:06.498842"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:06.518030"], ["created_at", "2015-04-09 15:13:06.518358"], ["updated_at", "2015-04-09 15:13:06.518358"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 35ms (Views: 4.1ms | ActiveRecord: 3.7ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 591498715) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:06', '2015-04-09 15:13:06', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:06', '2015-04-09 15:13:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:06', '2015-04-09 15:13:06', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:13:06.723159"], ["updated_at", "2015-04-09 15:13:06.723159"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:13:06.730048"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.5ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:13:06.737553"], ["updated_at", "2015-04-09 15:13:06.737553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:06.742223"], ["updated_at", "2015-04-09 15:13:06.742223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:13:06.862291"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:13:16.866537"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:13:06'\n updated_at: &6 2015-04-09 15:13:06.862291000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:13:06'\n updated_at: '2015-04-09 15:13:06'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:13:06'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:13:06.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:13:06.895540"], ["updated_at", "2015-04-09 15:13:06.895540"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:13:07.150388"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:13:07.681553"], ["id", 538821867]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:13:17.689459"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:13:06'\n updated_at: &6 2015-04-09 15:13:07.681553000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:13:06'\n updated_at: '2015-04-09 15:13:07.150388'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:13:06'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:13:06.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:13:07.722337"], ["updated_at", "2015-04-09 15:13:07.722337"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 591498715) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:07', '2015-04-09 15:13:07', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:07', '2015-04-09 15:13:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:07', '2015-04-09 15:13:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:07', '2015-04-09 15:13:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:07', '2015-04-09 15:13:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:07', '2015-04-09 15:13:07', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3b888054cf58787ddafa2bbcc2bc9419"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "3b888054cf58787ddafa2bbcc2bc9419"], ["created_at", "2015-04-09 15:13:07.959601"], ["updated_at", "2015-04-09 15:13:07.959601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:13:08.001210"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 17ms (Views: 3.9ms | ActiveRecord: 0.6ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "65660c911cb2c5a7813897454b3153ed"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "65660c911cb2c5a7813897454b3153ed"], ["created_at", "2015-04-09 15:13:08.059377"], ["updated_at", "2015-04-09 15:13:08.059377"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.1ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:13:08.063380"], ["updated_at", "2015-04-09 15:13:08.063380"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 5.1ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:35', '2015-04-09 15:13:35', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:35', '2015-04-09 15:13:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:35', '2015-04-09 15:13:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:35', '2015-04-09 15:13:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:35', '2015-04-09 15:13:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:35', '2015-04-09 15:13:35', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 13ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:13:36.083520"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:36.097624"], ["updated_at", "2015-04-09 15:13:36.097624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:36.105568"], ["updated_at", "2015-04-09 15:13:36.105568"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:13:36.107750"], ["updated_at", "2015-04-09 15:13:36.107750"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:13:36.109910"], ["updated_at", "2015-04-09 15:13:36.109910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:13:36.213809"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:13:46.217567"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:13:35'\n updated_at: &6 2015-04-09 15:13:36.213809000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:13:35'\n updated_at: '2015-04-09 15:13:35'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:13:35'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:13:35.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:13:36.248441"], ["updated_at", "2015-04-09 15:13:36.248441"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:13:36.509491"], ["id", 538821867]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:13:37.025807"], ["id", 538821867]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:13:47.033729"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:13:35'\n updated_at: &6 2015-04-09 15:13:37.025807000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:13:35'\n updated_at: '2015-04-09 15:13:36.509491'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:13:35'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:13:35.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:13:37.066481"], ["updated_at", "2015-04-09 15:13:37.066481"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 591498715) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:37', '2015-04-09 15:13:37', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bf1e03cb049f862a5027bfb485b5d865"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "bf1e03cb049f862a5027bfb485b5d865"], ["created_at", "2015-04-09 15:13:37.251032"], ["updated_at", "2015-04-09 15:13:37.251032"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.3ms | ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:13:37.304046"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:13:37.347622"], ["updated_at", "2015-04-09 15:13:37.347622"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:13:37.357762"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:13:37.364375"], ["updated_at", "2015-04-09 15:13:37.364375"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:37.370076"], ["updated_at", "2015-04-09 15:13:37.370076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (1.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:37.482473"], ["id", 68463692]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:37.513766"], ["created_at", "2015-04-09 15:13:37.514322"], ["updated_at", "2015-04-09 15:13:37.514322"]]  (1.5ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:37', '2015-04-09 15:13:37', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:37', '2015-04-09 15:13:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:37', '2015-04-09 15:13:37', 948421225)  (5.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b6f66dcfdc3396f46b5a71be1c88ab3e"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b6f66dcfdc3396f46b5a71be1c88ab3e"], ["created_at", "2015-04-09 15:13:37.923298"], ["updated_at", "2015-04-09 15:13:37.923298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2ca4228285c33d6d222706dd2f7eb0c9"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2ca4228285c33d6d222706dd2f7eb0c9"], ["created_at", "2015-04-09 15:13:37.929861"], ["updated_at", "2015-04-09 15:13:37.929861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cafa3e20f0342a65eee7a38009994a0d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cafa3e20f0342a65eee7a38009994a0d"], ["created_at", "2015-04-09 15:13:37.939904"], ["updated_at", "2015-04-09 15:13:37.939904"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c9d0f73ce32f863a8a5e69679394a17b"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c9d0f73ce32f863a8a5e69679394a17b"], ["created_at", "2015-04-09 15:13:37.943750"], ["updated_at", "2015-04-09 15:13:37.943750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cb87e022c093c4bd9c981201f9b3a4e9"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cb87e022c093c4bd9c981201f9b3a4e9"], ["created_at", "2015-04-09 15:13:37.951265"], ["updated_at", "2015-04-09 15:13:37.951265"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:13:37.967263"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:38.083126"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:38.108340"], ["created_at", "2015-04-09 15:13:38.108792"], ["updated_at", "2015-04-09 15:13:38.108792"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 517391740) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:38', '2015-04-09 15:13:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:13:38.280609"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.0ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:38.405400"], ["id", 68463692]]  (0.8ms) commit transaction  (0.3ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:38.432311"], ["created_at", "2015-04-09 15:13:38.432904"], ["updated_at", "2015-04-09 15:13:38.432904"]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 45ms (Views: 7.0ms | ActiveRecord: 3.7ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:38', '2015-04-09 15:13:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:38', '2015-04-09 15:13:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:38', '2015-04-09 15:13:38', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 16ms (Views: 4.2ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "058f6bf7d375d3f877160466f4a2f975"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "058f6bf7d375d3f877160466f4a2f975"], ["created_at", "2015-04-09 15:13:38.645619"], ["updated_at", "2015-04-09 15:13:38.645619"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:13:38.649737"], ["updated_at", "2015-04-09 15:13:38.649737"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 11ms (Views: 5.3ms | ActiveRecord: 0.5ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:55', '2015-04-09 15:13:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:55', '2015-04-09 15:13:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:55', '2015-04-09 15:13:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:55', '2015-04-09 15:13:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:55', '2015-04-09 15:13:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:55', '2015-04-09 15:13:55', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ed2b4591dfc49679fec0e112ab16306f"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ed2b4591dfc49679fec0e112ab16306f"], ["created_at", "2015-04-09 15:13:55.985988"], ["updated_at", "2015-04-09 15:13:55.985988"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bbeb8b4cbb22d20146ab3a0f8b425f9d"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bbeb8b4cbb22d20146ab3a0f8b425f9d"], ["created_at", "2015-04-09 15:13:55.992039"], ["updated_at", "2015-04-09 15:13:55.992039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dad4bdc0703f672dfae1abdcc4fe23e1"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dad4bdc0703f672dfae1abdcc4fe23e1"], ["created_at", "2015-04-09 15:13:56.000923"], ["updated_at", "2015-04-09 15:13:56.000923"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d0791d70873b74e7d40eae6108d97e67"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d0791d70873b74e7d40eae6108d97e67"], ["created_at", "2015-04-09 15:13:56.005227"], ["updated_at", "2015-04-09 15:13:56.005227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1128d93ce7dd2d1d2b1fffeb5e0caca5"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1128d93ce7dd2d1d2b1fffeb5e0caca5"], ["created_at", "2015-04-09 15:13:56.012020"], ["updated_at", "2015-04-09 15:13:56.012020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:13:56.032958"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:56.195329"], ["id", 68463692]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:56.217492"], ["created_at", "2015-04-09 15:13:56.217877"], ["updated_at", "2015-04-09 15:13:56.217877"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (15.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 591498715) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:56', '2015-04-09 15:13:56', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:56', '2015-04-09 15:13:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:56', '2015-04-09 15:13:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:56', '2015-04-09 15:13:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:56', '2015-04-09 15:13:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:56', '2015-04-09 15:13:56', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:13:56.447878"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:56.457385"], ["updated_at", "2015-04-09 15:13:56.457385"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:56.465477"], ["updated_at", "2015-04-09 15:13:56.465477"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-09 15:13:56.467260"], ["updated_at", "2015-04-09 15:13:56.467260"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-09 15:13:56.469468"], ["updated_at", "2015-04-09 15:13:56.469468"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:56.586190"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:56.611540"], ["created_at", "2015-04-09 15:13:56.612352"], ["updated_at", "2015-04-09 15:13:56.612352"]]  (1.1ms) commit transaction  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:57', '2015-04-09 15:13:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a921096fe785ced7924dce4750c87e8f"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "a921096fe785ced7924dce4750c87e8f"], ["created_at", "2015-04-09 15:13:57.074720"], ["updated_at", "2015-04-09 15:13:57.074720"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.6ms | ActiveRecord: 1.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 6ms (ActiveRecord: 0.3ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-09 15:13:57.140301"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 1.9ms | ActiveRecord: 1.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-09 15:13:57.290481"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-09 15:13:57.316713"], ["created_at", "2015-04-09 15:13:57.317298"], ["updated_at", "2015-04-09 15:13:57.317298"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 45ms (Views: 6.6ms | ActiveRecord: 3.3ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:57', '2015-04-09 15:13:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 419883833, 624739301, 701625837) Fixture Insert (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:57', '2015-04-09 15:13:57', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:57', '2015-04-09 15:13:57', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:13:57.616814"], ["id", 538821867]]  (1.4ms) commit transaction  (0.3ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:14:07.623016"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-09 15:13:57'\n updated_at: &6 2015-04-09 15:13:57.616814000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-09 15:13:57'\n updated_at: '2015-04-09 15:13:57'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:13:57'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:13:57.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:13:57.656410"], ["updated_at", "2015-04-09 15:13:57.656410"]]  (0.8ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-09 15:13:57.905162"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-09 15:13:58.419149"], ["id", 538821867]]  (4.7ms) commit transaction  (0.3ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-09 15:14:08.427030"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-09 15:13:57'\n updated_at: &6 2015-04-09 15:13:58.419149000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-09 15:13:57'\n updated_at: '2015-04-09 15:13:57.905162'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-09 15:13:57'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-09 15:13:57.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-09 15:13:58.465280"], ["updated_at", "2015-04-09 15:13:58.465280"]]  (1.5ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-09 15:13:58', '2015-04-09 15:13:58', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:58', '2015-04-09 15:13:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:58', '2015-04-09 15:13:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:58', '2015-04-09 15:13:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-09 15:13:58', '2015-04-09 15:13:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-09 15:13:58', '2015-04-09 15:13:58', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-09 15:13:58.674969"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.3ms | ActiveRecord: 1.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-09 15:13:58.728287"], ["updated_at", "2015-04-09 15:13:58.728287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-09 15:13:58.732825"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-09 15:13:58.736873"], ["updated_at", "2015-04-09 15:13:58.736873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-09 15:13:58.739289"], ["updated_at", "2015-04-09 15:13:58.739289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.9ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 32ms (Views: 5.3ms | ActiveRecord: 1.8ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.2ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "44866534031f6be48a728eeca2dddd78"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "44866534031f6be48a728eeca2dddd78"], ["created_at", "2015-04-09 15:13:58.812128"], ["updated_at", "2015-04-09 15:13:58.812128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-09 15:13:58.815617"], ["updated_at", "2015-04-09 15:13:58.815617"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.5ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 13ms (Views: 6.3ms | ActiveRecord: 0.7ms)  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 3ms (Views: 0.9ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (1.0ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)   (0.1ms) select sqlite_version(*)  (1.2ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at")  (1.1ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (1.0ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token")  (1.0ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  (0.9ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.8ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id")  (0.7ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)   (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")  (0.2ms) SELECT version FROM "schema_migrations"  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20141105073909')  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104135257')  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152227')  (1.5ms) INSERT INTO "schema_migrations" (version) VALUES ('20141104152345') ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateFoggedResources (20141103143408)  (0.1ms) begin transaction  (0.1ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  SQLite3::SQLException: table "fogged_resources" already exists: CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.1ms) rollback transaction  (5.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL)   (0.1ms) select sqlite_version(*)  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version") ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" Migrating to CreateFoggedResources (20141103143408)  (0.1ms) begin transaction  (0.6ms) CREATE TABLE "fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar NOT NULL, "token" varchar NOT NULL, "width" integer, "height" integer, "extension" varchar NOT NULL, "uploading" boolean, "content_type" varchar NOT NULL, "encoding_progress" integer, "encoding_job_id" varchar, "duration" integer, "created_at" datetime, "updated_at" datetime)  (0.2ms) CREATE INDEX "index_fogged_resources_on_token" ON "fogged_resources" ("token") SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141103143408"]]  (0.7ms) commit transaction Migrating to CreateImages (20141104135257)  (0.1ms) begin transaction  (0.6ms) CREATE TABLE "images" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "resource_id" integer, "created_at" datetime, "updated_at" datetime)  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104135257"]]  (0.9ms) commit transaction Migrating to CreateMovies (20141104152227)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "movies" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime, "updated_at" datetime)  SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152227"]]  (1.5ms) commit transaction Migrating to CreateMovieFoggedResources (20141104152345)  (0.1ms) begin transaction  (0.3ms) CREATE TABLE "movie_fogged_resources" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "movie_id" integer, "resource_id" integer, "created_at" datetime, "updated_at" datetime)   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_movie_id" ON "movie_fogged_resources" ("movie_id")  (0.1ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index'   (0.1ms) CREATE INDEX "index_movie_fogged_resources_on_resource_id" ON "movie_fogged_resources" ("resource_id") SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141104152345"]]  (0.8ms) commit transaction Migrating to CreateDelayedJobs (20141105073909)  (0.1ms) begin transaction  (0.7ms) CREATE TABLE "delayed_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "priority" integer DEFAULT 0 NOT NULL, "attempts" integer DEFAULT 0 NOT NULL, "handler" text NOT NULL, "last_error" text, "run_at" datetime, "locked_at" datetime, "failed_at" datetime, "locked_by" varchar, "queue" varchar, "created_at" datetime, "updated_at" datetime)  (0.2ms) CREATE INDEX "delayed_jobs_priority" ON "delayed_jobs" ("priority", "run_at") SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20141105073909"]]  (1.5ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='delayed_jobs_priority' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='delayed_jobs_priority' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_fogged_resources_on_token' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_fogged_resources_on_token' AND type='index'  (0.2ms)  SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_resource_id' AND type='index'   (0.1ms) SELECT sql FROM sqlite_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' UNION ALL SELECT sql FROM sqlite_temp_master WHERE name='index_movie_fogged_resources_on_movie_id' AND type='index' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:13:51', '2015-04-10 11:13:51', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:51', '2015-04-10 11:13:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:51', '2015-04-10 11:13:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:51', '2015-04-10 11:13:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:51', '2015-04-10 11:13:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:13:51', '2015-04-10 11:13:51', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 11:13:51.500909"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 11:14:01.509536"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 11:13:51'\n updated_at: &6 2015-04-10 11:13:51.500909000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 11:13:51'\n updated_at: '2015-04-10 11:13:51'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 11:13:51'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 11:13:51.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 11:13:51.538228"], ["updated_at", "2015-04-10 11:13:51.538228"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 11:13:51.791865"], ["id", 538821867]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.9ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 11:13:52.288909"], ["id", 538821867]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 11:14:02.298767"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 11:13:51'\n updated_at: &6 2015-04-10 11:13:52.288909000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 11:13:51'\n updated_at: '2015-04-10 11:13:51.791865'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 11:13:51'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 11:13:51.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 11:13:52.327565"], ["updated_at", "2015-04-10 11:13:52.327565"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:13:52', '2015-04-10 11:13:52', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:52', '2015-04-10 11:13:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:52', '2015-04-10 11:13:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:52', '2015-04-10 11:13:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:52', '2015-04-10 11:13:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:13:52', '2015-04-10 11:13:52', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f57f1fdc5d168e55ada610e93c30e850"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f57f1fdc5d168e55ada610e93c30e850"], ["created_at", "2015-04-10 11:13:52.505866"], ["updated_at", "2015-04-10 11:13:52.505866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "547387cd94faebbdf1d81a324dd58e74"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "547387cd94faebbdf1d81a324dd58e74"], ["created_at", "2015-04-10 11:13:52.511324"], ["updated_at", "2015-04-10 11:13:52.511324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d8f374b112b5e7bc91efd75907cc783e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d8f374b112b5e7bc91efd75907cc783e"], ["created_at", "2015-04-10 11:13:52.520348"], ["updated_at", "2015-04-10 11:13:52.520348"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8f5c056f9264ad9d17a6dd963b188414"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8f5c056f9264ad9d17a6dd963b188414"], ["created_at", "2015-04-10 11:13:52.524136"], ["updated_at", "2015-04-10 11:13:52.524136"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "916f1937c78dc5fd10ae9b63c8069ef8"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "916f1937c78dc5fd10ae9b63c8069ef8"], ["created_at", "2015-04-10 11:13:52.533787"], ["updated_at", "2015-04-10 11:13:52.533787"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 11:13:52.554267"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:13:52.685804"], ["id", 68463692]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:13:52.707136"], ["created_at", "2015-04-10 11:13:52.707903"], ["updated_at", "2015-04-10 11:13:52.707903"]]  (0.7ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:13:53', '2015-04-10 11:13:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:53', '2015-04-10 11:13:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:53', '2015-04-10 11:13:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:53', '2015-04-10 11:13:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:53', '2015-04-10 11:13:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:13:53', '2015-04-10 11:13:53', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "18abed2b3cc2e7fc219290ee8c55b2bf"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "18abed2b3cc2e7fc219290ee8c55b2bf"], ["created_at", "2015-04-10 11:13:53.203455"], ["updated_at", "2015-04-10 11:13:53.203455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.2ms | ActiveRecord: 0.8ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.4ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 11:13:53.292899"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 11:13:53.298604"], ["updated_at", "2015-04-10 11:13:53.298604"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 11:13:53.308254"], ["updated_at", "2015-04-10 11:13:53.308254"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 11:13:53.311692"], ["updated_at", "2015-04-10 11:13:53.311692"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 11:13:53.334761"], ["updated_at", "2015-04-10 11:13:53.334761"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 11:13:53.352046"], ["id", 591498715]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:13:53.481482"], ["id", 68463692]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:13:53.504579"], ["created_at", "2015-04-10 11:13:53.505227"], ["updated_at", "2015-04-10 11:13:53.505227"]]  (1.1ms) commit transaction Completed 500 Internal Server Error in 35ms (ActiveRecord: 4.0ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:13:54', '2015-04-10 11:13:54', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:54', '2015-04-10 11:13:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:54', '2015-04-10 11:13:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:54', '2015-04-10 11:13:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:54', '2015-04-10 11:13:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:13:54', '2015-04-10 11:13:54', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-10 11:13:54.081625"], ["updated_at", "2015-04-10 11:13:54.081625"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 11:13:54.095307"], ["id", 701625837]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 11:13:54.103590"], ["updated_at", "2015-04-10 11:13:54.103590"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 11:13:54.108887"], ["updated_at", "2015-04-10 11:13:54.108887"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:13:55', '2015-04-10 11:13:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:55', '2015-04-10 11:13:55', 419883833, 624739301, 701625837) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:55', '2015-04-10 11:13:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:55', '2015-04-10 11:13:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:13:55', '2015-04-10 11:13:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:13:55', '2015-04-10 11:13:55', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 25ms (Views: 5.8ms | ActiveRecord: 0.6ms) Movie Load (0.6ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.3ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 5.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f36e07242791e79ba6e4de368870e0e1"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "f36e07242791e79ba6e4de368870e0e1"], ["created_at", "2015-04-10 11:13:55.444182"], ["updated_at", "2015-04-10 11:13:55.444182"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-10 11:13:55.451366"], ["updated_at", "2015-04-10 11:13:55.451366"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.4ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 13ms (Views: 5.1ms | ActiveRecord: 0.6ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 11:13:55.511751"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.3ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms)  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:14:54', '2015-04-10 11:14:54', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:14:54', '2015-04-10 11:14:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:14:54', '2015-04-10 11:14:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:14:54', '2015-04-10 11:14:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:14:54', '2015-04-10 11:14:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:14:54', '2015-04-10 11:14:54', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "76d8659b6bfc8baf8087b47e4aa65549"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "76d8659b6bfc8baf8087b47e4aa65549"], ["created_at", "2015-04-10 11:14:54.670906"], ["updated_at", "2015-04-10 11:14:54.670906"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d620e6a70e0e395a5b5123752eb9c19b"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d620e6a70e0e395a5b5123752eb9c19b"], ["created_at", "2015-04-10 11:14:54.677223"], ["updated_at", "2015-04-10 11:14:54.677223"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "aaa672bfcc4b4196106042084ddf4fd4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "aaa672bfcc4b4196106042084ddf4fd4"], ["created_at", "2015-04-10 11:14:54.685630"], ["updated_at", "2015-04-10 11:14:54.685630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "155e4618a3f1d9573629c9807bd5dd0e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "155e4618a3f1d9573629c9807bd5dd0e"], ["created_at", "2015-04-10 11:14:54.689996"], ["updated_at", "2015-04-10 11:14:54.689996"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "472559fcd56de9c92d0edc08e60af687"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "472559fcd56de9c92d0edc08e60af687"], ["created_at", "2015-04-10 11:14:54.695758"], ["updated_at", "2015-04-10 11:14:54.695758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 11:14:54.720982"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:14:54.836940"], ["id", 68463692]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:14:54.861617"], ["created_at", "2015-04-10 11:14:54.862138"], ["updated_at", "2015-04-10 11:14:54.862138"]]  (1.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 68463692) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:15:30', '2015-04-10 11:15:30', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:30', '2015-04-10 11:15:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:30', '2015-04-10 11:15:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:30', '2015-04-10 11:15:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:30', '2015-04-10 11:15:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:15:30', '2015-04-10 11:15:30', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.5ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0c7f969537f61f69e5b94b2cd160648f"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0c7f969537f61f69e5b94b2cd160648f"], ["created_at", "2015-04-10 11:15:30.484683"], ["updated_at", "2015-04-10 11:15:30.484683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "51789ee7d60109cb7510cbd3a39fe9f8"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "51789ee7d60109cb7510cbd3a39fe9f8"], ["created_at", "2015-04-10 11:15:30.488772"], ["updated_at", "2015-04-10 11:15:30.488772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e76d4de70ff7e4a79f355be93811ac29"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e76d4de70ff7e4a79f355be93811ac29"], ["created_at", "2015-04-10 11:15:30.499704"], ["updated_at", "2015-04-10 11:15:30.499704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1bdd18de7a2746a92837541c630fdad7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1bdd18de7a2746a92837541c630fdad7"], ["created_at", "2015-04-10 11:15:30.505225"], ["updated_at", "2015-04-10 11:15:30.505225"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ce26cfbc183e3985c10ec8011b690a32"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ce26cfbc183e3985c10ec8011b690a32"], ["created_at", "2015-04-10 11:15:30.511797"], ["updated_at", "2015-04-10 11:15:30.511797"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 11:15:30.528504"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:15:30.654527"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:15:30.677614"], ["created_at", "2015-04-10 11:15:30.678244"], ["updated_at", "2015-04-10 11:15:30.678244"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:15:38', '2015-04-10 11:15:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 11:15:38.116509"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 1.5ms | ActiveRecord: 1.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (2.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:15:38.268175"], ["id", 68463692]]  (0.7ms) commit transaction  (0.3ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:15:38.292426"], ["created_at", "2015-04-10 11:15:38.292959"], ["updated_at", "2015-04-10 11:15:38.292959"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 43ms (Views: 7.9ms | ActiveRecord: 3.5ms)  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:15:38', '2015-04-10 11:15:38', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:38', '2015-04-10 11:15:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:15:38', '2015-04-10 11:15:38', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:15:39', '2015-04-10 11:15:39', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:39', '2015-04-10 11:15:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:39', '2015-04-10 11:15:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:39', '2015-04-10 11:15:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:39', '2015-04-10 11:15:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:15:39', '2015-04-10 11:15:39', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"68463692"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 1.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"591498715"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 11:15:39.366534"], ["id", 591498715]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.4ms | ActiveRecord: 1.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 11:15:39.426185"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 11:15:39.439864"], ["updated_at", "2015-04-10 11:15:39.439864"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 11:15:39.452186"], ["updated_at", "2015-04-10 11:15:39.452186"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 11:15:39.456440"], ["updated_at", "2015-04-10 11:15:39.456440"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 11:15:39.459356"], ["updated_at", "2015-04-10 11:15:39.459356"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 11:15:39.587432"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 11:15:49.591199"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 11:15:39'\n updated_at: &6 2015-04-10 11:15:39.587432000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 11:15:39'\n updated_at: '2015-04-10 11:15:39'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 11:15:39'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 11:15:39.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 11:15:39.625620"], ["updated_at", "2015-04-10 11:15:39.625620"]]  (1.6ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 11:15:39.913127"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 11:15:40.465310"], ["id", 538821867]]  (0.8ms) commit transaction  (0.4ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 11:15:50.471371"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 11:15:39'\n updated_at: &6 2015-04-10 11:15:40.465310000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 11:15:39'\n updated_at: '2015-04-10 11:15:39.913127'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 11:15:39'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 11:15:39.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 11:15:40.517582"], ["updated_at", "2015-04-10 11:15:40.517582"]]  (1.2ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:15:40', '2015-04-10 11:15:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 153115190) Fixture Delete (0.4ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:40', '2015-04-10 11:15:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:40', '2015-04-10 11:15:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:40', '2015-04-10 11:15:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:40', '2015-04-10 11:15:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:15:40', '2015-04-10 11:15:40', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 20ms (Views: 5.8ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3ea1bd939471c6c2182d8c8ba7a15e54"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "3ea1bd939471c6c2182d8c8ba7a15e54"], ["created_at", "2015-04-10 11:15:40.791552"], ["updated_at", "2015-04-10 11:15:40.791552"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 819504218], ["created_at", "2015-04-10 11:15:40.796005"], ["updated_at", "2015-04-10 11:15:40.796005"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 0.5ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.5ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 15ms (Views: 4.9ms | ActiveRecord: 0.9ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.6ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 591498715], ["created_at", "2015-04-10 11:15:40.860360"], ["updated_at", "2015-04-10 11:15:40.860360"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 11:15:40.865463"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 11:15:40.870346"], ["updated_at", "2015-04-10 11:15:40.870346"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 11:15:40.872847"], ["updated_at", "2015-04-10 11:15:40.872847"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c6b94d6be3fce262f8567de38450d76e"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c6b94d6be3fce262f8567de38450d76e"], ["created_at", "2015-04-10 11:15:40.877370"], ["updated_at", "2015-04-10 11:15:40.877370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dd4316c205441a9c9f5bd3d58dceaedb"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dd4316c205441a9c9f5bd3d58dceaedb"], ["created_at", "2015-04-10 11:15:40.882364"], ["updated_at", "2015-04-10 11:15:40.882364"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 819504218]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5639711ecdd825fd09b7a64fac51e758"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5639711ecdd825fd09b7a64fac51e758"], ["created_at", "2015-04-10 11:15:40.895620"], ["updated_at", "2015-04-10 11:15:40.895620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1b0172613e5ca62af1e78713c026881e"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1b0172613e5ca62af1e78713c026881e"], ["created_at", "2015-04-10 11:15:40.903728"], ["updated_at", "2015-04-10 11:15:40.903728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d9b8975fafba9ec9d067b14e95977d8c"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d9b8975fafba9ec9d067b14e95977d8c"], ["created_at", "2015-04-10 11:15:40.909812"], ["updated_at", "2015-04-10 11:15:40.909812"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 11:15:40.928638"], ["id", 591498715]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:15:41.056321"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:15:41.076940"], ["created_at", "2015-04-10 11:15:41.077399"], ["updated_at", "2015-04-10 11:15:41.077399"]]  (1.1ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:15:41', '2015-04-10 11:15:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:41', '2015-04-10 11:15:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:41', '2015-04-10 11:15:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:41', '2015-04-10 11:15:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:15:41', '2015-04-10 11:15:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:15:41', '2015-04-10 11:15:41', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9ad91ba3b5047e40f2e1a9568f35242b"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "9ad91ba3b5047e40f2e1a9568f35242b"], ["created_at", "2015-04-10 11:15:41.260719"], ["updated_at", "2015-04-10 11:15:41.260719"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 0.9ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:16:07', '2015-04-10 11:16:07', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:07', '2015-04-10 11:16:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:07', '2015-04-10 11:16:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:07', '2015-04-10 11:16:07', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:07', '2015-04-10 11:16:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:16:07', '2015-04-10 11:16:07', 948421225)  (4.9ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:16:28', '2015-04-10 11:16:28', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 153115190) Fixture Delete (0.4ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:28', '2015-04-10 11:16:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:28', '2015-04-10 11:16:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:28', '2015-04-10 11:16:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:16:28', '2015-04-10 11:16:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:16:28', '2015-04-10 11:16:28', 948421225)  (5.6ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:17:09', '2015-04-10 11:17:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:09', '2015-04-10 11:17:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:09', '2015-04-10 11:17:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:09', '2015-04-10 11:17:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:09', '2015-04-10 11:17:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:17:09', '2015-04-10 11:17:09', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 517391740) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 701625837) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 819504217) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 68463692) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:17:44', '2015-04-10 11:17:44', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:44', '2015-04-10 11:17:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:44', '2015-04-10 11:17:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:44', '2015-04-10 11:17:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:17:44', '2015-04-10 11:17:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:17:44', '2015-04-10 11:17:44', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:17:44.994751"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:17:45.020342"], ["created_at", "2015-04-10 11:17:45.020957"], ["updated_at", "2015-04-10 11:17:45.020957"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:18:02', '2015-04-10 11:18:02', 538821867) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:18:02', '2015-04-10 11:18:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:18:02', '2015-04-10 11:18:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:18:02', '2015-04-10 11:18:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:18:02', '2015-04-10 11:18:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:18:02', '2015-04-10 11:18:02', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:18:02.863066"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:18:02.887039"], ["created_at", "2015-04-10 11:18:02.887773"], ["updated_at", "2015-04-10 11:18:02.887773"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:20:28', '2015-04-10 11:20:28', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:20:28', '2015-04-10 11:20:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:20:28', '2015-04-10 11:20:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:20:28', '2015-04-10 11:20:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:20:28', '2015-04-10 11:20:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:20:28', '2015-04-10 11:20:28', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:20:28.164381"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:20:28.188784"], ["created_at", "2015-04-10 11:20:28.189105"], ["updated_at", "2015-04-10 11:20:28.189105"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:21:40', '2015-04-10 11:21:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:21:40', '2015-04-10 11:21:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:21:40', '2015-04-10 11:21:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:21:40', '2015-04-10 11:21:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:21:40', '2015-04-10 11:21:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:21:40', '2015-04-10 11:21:40', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:21:40.600858"], ["id", 68463692]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:21:40.632482"], ["created_at", "2015-04-10 11:21:40.632974"], ["updated_at", "2015-04-10 11:21:40.632974"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:25:00', '2015-04-10 11:25:00', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:25:00', '2015-04-10 11:25:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:25:00', '2015-04-10 11:25:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:25:00', '2015-04-10 11:25:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:25:00', '2015-04-10 11:25:00', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:25:00', '2015-04-10 11:25:00', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:25:00.377988"], ["id", 68463692]]  (1.1ms) commit transaction  (0.3ms) begin transaction SQL (1.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:25:00.410465"], ["created_at", "2015-04-10 11:25:00.411014"], ["updated_at", "2015-04-10 11:25:00.411014"]]  (1.6ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources"  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 132093124) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:26:18', '2015-04-10 11:26:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:18', '2015-04-10 11:26:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:18', '2015-04-10 11:26:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:18', '2015-04-10 11:26:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:18', '2015-04-10 11:26:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:26:18', '2015-04-10 11:26:18', 948421225)  (5.5ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:26:26.266036"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:26:26.289815"], ["created_at", "2015-04-10 11:26:26.290136"], ["updated_at", "2015-04-10 11:26:26.290136"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:26:44', '2015-04-10 11:26:44', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:44', '2015-04-10 11:26:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:44', '2015-04-10 11:26:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:44', '2015-04-10 11:26:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:26:44', '2015-04-10 11:26:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:26:44', '2015-04-10 11:26:44', 948421225)  (1.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:26:50.634365"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:26:50.657727"], ["created_at", "2015-04-10 11:26:50.658048"], ["updated_at", "2015-04-10 11:26:50.658048"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:27:09', '2015-04-10 11:27:09', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:09', '2015-04-10 11:27:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:09', '2015-04-10 11:27:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:09', '2015-04-10 11:27:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:09', '2015-04-10 11:27:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:27:09', '2015-04-10 11:27:09', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:27:09.291546"], ["id", 68463692]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:27:09.319650"], ["created_at", "2015-04-10 11:27:09.320087"], ["updated_at", "2015-04-10 11:27:09.320087"]]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:27:37', '2015-04-10 11:27:37', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:37', '2015-04-10 11:27:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:37', '2015-04-10 11:27:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:37', '2015-04-10 11:27:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:27:37', '2015-04-10 11:27:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:27:37', '2015-04-10 11:27:37', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:27:37.905627"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:27:37.930886"], ["created_at", "2015-04-10 11:27:37.931190"], ["updated_at", "2015-04-10 11:27:37.931190"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:28:16', '2015-04-10 11:28:16', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:16', '2015-04-10 11:28:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:16', '2015-04-10 11:28:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:16', '2015-04-10 11:28:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:16', '2015-04-10 11:28:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:28:16', '2015-04-10 11:28:16', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:28:16.303795"], ["id", 68463692]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:28:16.353844"], ["created_at", "2015-04-10 11:28:16.354424"], ["updated_at", "2015-04-10 11:28:16.354424"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:28:29', '2015-04-10 11:28:29', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:29', '2015-04-10 11:28:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:29', '2015-04-10 11:28:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:29', '2015-04-10 11:28:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:29', '2015-04-10 11:28:29', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:28:29', '2015-04-10 11:28:29', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:28:31.633416"], ["id", 68463692]]  (4.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:28:31.661168"], ["created_at", "2015-04-10 11:28:31.661663"], ["updated_at", "2015-04-10 11:28:31.661663"]]  (0.9ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:28:40', '2015-04-10 11:28:40', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:40', '2015-04-10 11:28:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:40', '2015-04-10 11:28:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:40', '2015-04-10 11:28:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:28:40', '2015-04-10 11:28:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:28:40', '2015-04-10 11:28:40', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:31:32', '2015-04-10 11:31:32', 538821867) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:32', '2015-04-10 11:31:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:32', '2015-04-10 11:31:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:32', '2015-04-10 11:31:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:32', '2015-04-10 11:31:32', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:31:32', '2015-04-10 11:31:32', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.4ms) ROLLBACK SQLite3::SQLException: cannot rollback - no transaction is active: ROLLBACK ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:31:51', '2015-04-10 11:31:51', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:51', '2015-04-10 11:31:51', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:51', '2015-04-10 11:31:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:51', '2015-04-10 11:31:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:51', '2015-04-10 11:31:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:31:51', '2015-04-10 11:31:51', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.0ms) BEGIN  (0.1ms) ROLLBACK ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:31:56', '2015-04-10 11:31:56', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:56', '2015-04-10 11:31:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:56', '2015-04-10 11:31:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:56', '2015-04-10 11:31:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:31:56', '2015-04-10 11:31:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:31:56', '2015-04-10 11:31:56', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.3ms) BEGIN  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction  (0.1ms) ROLLBACK  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.9ms) BEGIN Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) ROLLBACK  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.1ms) BEGIN  (0.1ms) ROLLBACK  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:33:34', '2015-04-10 11:33:34', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:34', '2015-04-10 11:33:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:34', '2015-04-10 11:33:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:34', '2015-04-10 11:33:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:34', '2015-04-10 11:33:34', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:33:34', '2015-04-10 11:33:34', 948421225)  (1.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) ROLLBACK  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:33:34.694066"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (2.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:33:34.725324"], ["created_at", "2015-04-10 11:33:34.726659"], ["updated_at", "2015-04-10 11:33:34.726659"]]  (0.9ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) BEGIN  (0.2ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction  (0.1ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction  (0.2ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction  (0.2ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 591498715) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:33:47', '2015-04-10 11:33:47', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:47', '2015-04-10 11:33:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:47', '2015-04-10 11:33:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:47', '2015-04-10 11:33:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:33:47', '2015-04-10 11:33:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 624739301) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:33:47', '2015-04-10 11:33:47', 948421225)  (5.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (1.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:33:47.466316"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:33:47.502791"], ["created_at", "2015-04-10 11:33:47.503588"], ["updated_at", "2015-04-10 11:33:47.503588"]]  (1.8ms) commit transaction  (1.8ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:38:24', '2015-04-10 11:38:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:38:24', '2015-04-10 11:38:24', 538821867) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:38:25', '2015-04-10 11:38:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:38:25', '2015-04-10 11:38:25', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:38:25', '2015-04-10 11:38:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:38:25', '2015-04-10 11:38:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:38:25', '2015-04-10 11:38:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:38:25', '2015-04-10 11:38:25', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:38:25', '2015-04-10 11:38:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:38:25', '2015-04-10 11:38:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:38:25', '2015-04-10 11:38:25', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.7ms) ROLLBACK SQLite3::SQLException: cannot rollback - no transaction is active: ROLLBACK  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.1ms) ROLLBACK SQLite3::SQLException: cannot rollback - no transaction is active: ROLLBACK  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (1.2ms) ROLLBACK SQLite3::SQLException: cannot rollback - no transaction is active: ROLLBACK  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:39:02', '2015-04-10 11:39:02', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:02', '2015-04-10 11:39:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:02', '2015-04-10 11:39:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:02', '2015-04-10 11:39:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:02', '2015-04-10 11:39:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:39:02', '2015-04-10 11:39:02', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.8ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:39:58', '2015-04-10 11:39:58', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:58', '2015-04-10 11:39:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:58', '2015-04-10 11:39:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:58', '2015-04-10 11:39:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:39:58', '2015-04-10 11:39:58', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:39:58', '2015-04-10 11:39:58', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.3ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:40:25', '2015-04-10 11:40:25', 538821867) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:40:25', '2015-04-10 11:40:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:40:25', '2015-04-10 11:40:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:40:25', '2015-04-10 11:40:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:40:25', '2015-04-10 11:40:25', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:40:25', '2015-04-10 11:40:25', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) BEGIN  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQLite3::SQLException: cannot start a transaction within a transaction: begin transaction  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.6ms) BEGIN ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:41:25', '2015-04-10 11:41:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:25', '2015-04-10 11:41:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:25', '2015-04-10 11:41:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:25', '2015-04-10 11:41:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:25', '2015-04-10 11:41:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:41:25', '2015-04-10 11:41:25', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) ROLLBACK  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:41:25.549221"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (2.0ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:41:25.582394"], ["created_at", "2015-04-10 11:41:25.584136"], ["updated_at", "2015-04-10 11:41:25.584136"]]  (1.8ms) commit transaction  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 591498715) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:41:53', '2015-04-10 11:41:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:53', '2015-04-10 11:41:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:53', '2015-04-10 11:41:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:53', '2015-04-10 11:41:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:41:53', '2015-04-10 11:41:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:41:53', '2015-04-10 11:41:53', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:41:53.798197"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:41:53.824251"], ["created_at", "2015-04-10 11:41:53.824648"], ["updated_at", "2015-04-10 11:41:53.824648"]]  (0.8ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) ROLLBACK  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 591498715) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:58:09', '2015-04-10 11:58:09', 538821867) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:09', '2015-04-10 11:58:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:09', '2015-04-10 11:58:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:09', '2015-04-10 11:58:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:09', '2015-04-10 11:58:09', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:58:09', '2015-04-10 11:58:09', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:58:09.200731"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:58:09.224796"], ["created_at", "2015-04-10 11:58:09.225521"], ["updated_at", "2015-04-10 11:58:09.225521"]]  (0.8ms) commit transaction  (3.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:58:18', '2015-04-10 11:58:18', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:18', '2015-04-10 11:58:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:18', '2015-04-10 11:58:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:18', '2015-04-10 11:58:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:18', '2015-04-10 11:58:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:58:18', '2015-04-10 11:58:18', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 431685987) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 11:58:24', '2015-04-10 11:58:24', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:24', '2015-04-10 11:58:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:24', '2015-04-10 11:58:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:24', '2015-04-10 11:58:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 11:58:24', '2015-04-10 11:58:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 11:58:24', '2015-04-10 11:58:24', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 11:58:24.341702"], ["id", 68463692]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 11:58:24.366799"], ["created_at", "2015-04-10 11:58:24.367563"], ["updated_at", "2015-04-10 11:58:24.367563"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.7ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', '12345678902mov', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:00:14', '2015-04-10 12:00:14', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:14', '2015-04-10 12:00:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:14', '2015-04-10 12:00:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:14', '2015-04-10 12:00:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:14', '2015-04-10 12:00:14', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:00:14', '2015-04-10 12:00:14', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:00:15.119337"], ["id", 68463692]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 68463692\n"], ["run_at", "2015-04-10 12:00:15.141869"], ["created_at", "2015-04-10 12:00:15.142233"], ["updated_at", "2015-04-10 12:00:15.142233"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder -------------------------------------------------------------------------------------  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 68463692) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', '12345678902mov', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:00:37', '2015-04-10 12:00:37', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:37', '2015-04-10 12:00:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:37', '2015-04-10 12:00:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:37', '2015-04-10 12:00:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:00:37', '2015-04-10 12:00:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:00:37', '2015-04-10 12:00:37', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_file_with_zencoder ------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:00:37.681489"], ["id", 183950720]]  (0.9ms) commit transaction  (0.3ms) begin transaction SQL (1.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 183950720\n"], ["run_at", "2015-04-10 12:00:37.719890"], ["created_at", "2015-04-10 12:00:37.722111"], ["updated_at", "2015-04-10 12:00:37.722111"]]  (1.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 68463692]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder -------------------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', '1234567890png', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 591498715) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:04:04', '2015-04-10 12:04:04', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:04:04', '2015-04-10 12:04:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:04:04', '2015-04-10 12:04:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:04:04', '2015-04-10 12:04:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:04:04', '2015-04-10 12:04:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:04:04', '2015-04-10 12:04:04', 948421225)  (1.1ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:04:04.281372"], ["id", 1039265257]]  (1.2ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:04:04.307085"], ["created_at", "2015-04-10 12:04:04.307396"], ["updated_at", "2015-04-10 12:04:04.307396"]]  (2.1ms) commit transaction  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 591498715]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:06:25', '2015-04-10 12:06:25', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:25', '2015-04-10 12:06:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:25', '2015-04-10 12:06:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:25', '2015-04-10 12:06:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:25', '2015-04-10 12:06:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:06:25', '2015-04-10 12:06:25', 948421225)  (5.9ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ----------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:06:25.573757"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:06:25.600274"], ["created_at", "2015-04-10 12:06:25.600838"], ["updated_at", "2015-04-10 12:06:25.600838"]]  (1.5ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 1039265257) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:06:53', '2015-04-10 12:06:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:53', '2015-04-10 12:06:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:53', '2015-04-10 12:06:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:53', '2015-04-10 12:06:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:06:53', '2015-04-10 12:06:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:06:53', '2015-04-10 12:06:53', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:11:09', '2015-04-10 12:11:09', 538821867) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:09', '2015-04-10 12:11:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:09', '2015-04-10 12:11:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:09', '2015-04-10 12:11:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:09', '2015-04-10 12:11:09', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:11:09', '2015-04-10 12:11:09', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:11:19', '2015-04-10 12:11:19', 538821867) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:19', '2015-04-10 12:11:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:19', '2015-04-10 12:11:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:19', '2015-04-10 12:11:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:11:19', '2015-04-10 12:11:19', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 624739301) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 245026679) Fixture Insert (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:11:19', '2015-04-10 12:11:19', 948421225)  (5.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 14225656) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:12:30', '2015-04-10 12:12:30', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:12:30', '2015-04-10 12:12:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:12:30', '2015-04-10 12:12:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:12:30', '2015-04-10 12:12:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:12:30', '2015-04-10 12:12:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:12:30', '2015-04-10 12:12:30', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:13:31', '2015-04-10 12:13:31', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:31', '2015-04-10 12:13:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:31', '2015-04-10 12:13:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:31', '2015-04-10 12:13:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:31', '2015-04-10 12:13:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:13:31', '2015-04-10 12:13:31', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:13:36', '2015-04-10 12:13:36', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:36', '2015-04-10 12:13:36', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:36', '2015-04-10 12:13:36', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:36', '2015-04-10 12:13:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:36', '2015-04-10 12:13:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:13:36', '2015-04-10 12:13:36', 948421225)  (5.6ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ----------------------------------------------------------------  (0.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:13:49', '2015-04-10 12:13:49', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:49', '2015-04-10 12:13:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:49', '2015-04-10 12:13:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:49', '2015-04-10 12:13:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:13:49', '2015-04-10 12:13:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:13:49', '2015-04-10 12:13:49', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:14:15', '2015-04-10 12:14:15', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:15', '2015-04-10 12:14:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:15', '2015-04-10 12:14:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:15', '2015-04-10 12:14:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:15', '2015-04-10 12:14:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 245026679) Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:14:15', '2015-04-10 12:14:15', 948421225)  (5.4ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:14:27', '2015-04-10 12:14:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:27', '2015-04-10 12:14:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:27', '2015-04-10 12:14:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:27', '2015-04-10 12:14:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:27', '2015-04-10 12:14:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:14:27', '2015-04-10 12:14:27', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:14:28.002067"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:14:28.027784"], ["created_at", "2015-04-10 12:14:28.029006"], ["updated_at", "2015-04-10 12:14:28.029006"]]  (1.1ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:14:41', '2015-04-10 12:14:41', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:41', '2015-04-10 12:14:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:41', '2015-04-10 12:14:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:41', '2015-04-10 12:14:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:41', '2015-04-10 12:14:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:14:41', '2015-04-10 12:14:41', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:14:42.122657"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:14:42.145727"], ["created_at", "2015-04-10 12:14:42.146039"], ["updated_at", "2015-04-10 12:14:42.146039"]]  (1.8ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:14:56', '2015-04-10 12:14:56', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:56', '2015-04-10 12:14:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:56', '2015-04-10 12:14:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:56', '2015-04-10 12:14:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:14:56', '2015-04-10 12:14:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:14:56', '2015-04-10 12:14:56', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ----------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:14:56.478668"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:14:56.501401"], ["created_at", "2015-04-10 12:14:56.501752"], ["updated_at", "2015-04-10 12:14:56.501752"]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:17:07', '2015-04-10 12:17:07', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:07', '2015-04-10 12:17:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:07', '2015-04-10 12:17:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:07', '2015-04-10 12:17:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:07', '2015-04-10 12:17:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:17:07', '2015-04-10 12:17:07', 948421225)  (5.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:17:07.892147"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:17:07.917833"], ["created_at", "2015-04-10 12:17:07.918384"], ["updated_at", "2015-04-10 12:17:07.918384"]]  (1.0ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:17:23', '2015-04-10 12:17:23', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:23', '2015-04-10 12:17:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:23', '2015-04-10 12:17:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:23', '2015-04-10 12:17:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:17:23', '2015-04-10 12:17:23', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:17:23', '2015-04-10 12:17:23', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:21', '2015-04-10 12:18:21', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:21', '2015-04-10 12:18:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:21', '2015-04-10 12:18:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:21', '2015-04-10 12:18:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:21', '2015-04-10 12:18:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:21', '2015-04-10 12:18:21', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\ntarget_key: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 12:18:21.430786"], ["created_at", "2015-04-10 12:18:21.431563"], ["updated_at", "2015-04-10 12:18:21.431563"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\ntarget_key: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 12:18:21.437798"], ["created_at", "2015-04-10 12:18:21.438008"], ["updated_at", "2015-04-10 12:18:21.438008"]]  (1.5ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:27', '2015-04-10 12:18:27', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:27', '2015-04-10 12:18:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:27', '2015-04-10 12:18:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:27', '2015-04-10 12:18:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:27', '2015-04-10 12:18:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:27', '2015-04-10 12:18:27', 948421225)  (5.7ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\ntarget_key: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 12:18:27.353428"], ["created_at", "2015-04-10 12:18:27.353905"], ["updated_at", "2015-04-10 12:18:27.353905"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\ntarget_key: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 12:18:27.360260"], ["created_at", "2015-04-10 12:18:27.360474"], ["updated_at", "2015-04-10 12:18:27.360474"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:18:27.685304"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:18:27.712349"], ["created_at", "2015-04-10 12:18:27.712734"], ["updated_at", "2015-04-10 12:18:27.712734"]]  (0.8ms) commit transaction  (3.8ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (1.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:45', '2015-04-10 12:18:45', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:45', '2015-04-10 12:18:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:45', '2015-04-10 12:18:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:45', '2015-04-10 12:18:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:45', '2015-04-10 12:18:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:45', '2015-04-10 12:18:45', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 12:18:45.885731"], ["id", 431685987]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:18:45.901964"], ["updated_at", "2015-04-10 12:18:45.901964"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:18:45.910298"], ["updated_at", "2015-04-10 12:18:45.910298"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 12:18:45.913785"], ["updated_at", "2015-04-10 12:18:45.913785"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 12:18:45.916112"], ["updated_at", "2015-04-10 12:18:45.916112"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d4d436845c212e67b9611c5704265286"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "d4d436845c212e67b9611c5704265286"], ["created_at", "2015-04-10 12:18:45.933395"], ["updated_at", "2015-04-10 12:18:45.933395"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 3.8ms | ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.5ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 12:18:45.986772"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 12:18:45.993983"], ["updated_at", "2015-04-10 12:18:45.993983"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:18:45.997886"], ["updated_at", "2015-04-10 12:18:45.997886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource --------------------------------------------------------------------  (0.2ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:46', '2015-04-10 12:18:46', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:46', '2015-04-10 12:18:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:46', '2015-04-10 12:18:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:46', '2015-04-10 12:18:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:46', '2015-04-10 12:18:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:46', '2015-04-10 12:18:46', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id --------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\ntarget_key: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 12:18:46.821492"], ["created_at", "2015-04-10 12:18:46.821859"], ["updated_at", "2015-04-10 12:18:46.821859"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\ntarget_key: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 12:18:46.826624"], ["created_at", "2015-04-10 12:18:46.826872"], ["updated_at", "2015-04-10 12:18:46.826872"]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:18:47.118478"], ["id", 1039265257]]  (1.4ms) commit transaction  (0.1ms) begin transaction SQL (1.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:18:47.146521"], ["created_at", "2015-04-10 12:18:47.146850"], ["updated_at", "2015-04-10 12:18:47.146850"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:48', '2015-04-10 12:18:48', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:48', '2015-04-10 12:18:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:48', '2015-04-10 12:18:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:48', '2015-04-10 12:18:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:48', '2015-04-10 12:18:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:48', '2015-04-10 12:18:48', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 6ms (Views: 4.8ms | ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource --------------------------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource --------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 7.5ms | ActiveRecord: 0.8ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "97ac793e4f2c714cf1c2703afbba5b0c"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "97ac793e4f2c714cf1c2703afbba5b0c"], ["created_at", "2015-04-10 12:18:48.371204"], ["updated_at", "2015-04-10 12:18:48.371204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 12:18:48.376701"], ["updated_at", "2015-04-10 12:18:48.376701"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 1.9ms | ActiveRecord: 0.5ms)  (1.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 3ms (Views: 0.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 12:18:48.539376"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 12:18:58.543614"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 12:18:48'\n updated_at: &6 2015-04-10 12:18:48.539376000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 12:18:48'\n updated_at: '2015-04-10 12:18:48'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 12:18:48'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 12:18:48.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 12:18:48.583214"], ["updated_at", "2015-04-10 12:18:48.583214"]]  (0.9ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 12:18:48.858876"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 12:18:49.394180"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (1.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 12:18:59.398134"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 12:18:48'\n updated_at: &6 2015-04-10 12:18:49.394180000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 12:18:48'\n updated_at: '2015-04-10 12:18:48.858876'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 12:18:48'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 12:18:48.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 12:18:49.433873"], ["updated_at", "2015-04-10 12:18:49.433873"]]  (1.4ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:49', '2015-04-10 12:18:49', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:49', '2015-04-10 12:18:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:49', '2015-04-10 12:18:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:49', '2015-04-10 12:18:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:49', '2015-04-10 12:18:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:49', '2015-04-10 12:18:49', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "529b1b0906a8d5abb25e83d85279261b"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "529b1b0906a8d5abb25e83d85279261b"], ["created_at", "2015-04-10 12:18:49.624614"], ["updated_at", "2015-04-10 12:18:49.624614"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a9c4b4ace3d2c6717ebf92b6f179725b"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a9c4b4ace3d2c6717ebf92b6f179725b"], ["created_at", "2015-04-10 12:18:49.632248"], ["updated_at", "2015-04-10 12:18:49.632248"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "437f5623916e93492c7854a4bea98925"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "437f5623916e93492c7854a4bea98925"], ["created_at", "2015-04-10 12:18:49.639869"], ["updated_at", "2015-04-10 12:18:49.639869"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2627754f36bfdbbe39c952db7efb0fee"]] SQL (0.9ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2627754f36bfdbbe39c952db7efb0fee"], ["created_at", "2015-04-10 12:18:49.645198"], ["updated_at", "2015-04-10 12:18:49.645198"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f26aac0142b8ad5339c5b897ff486493"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f26aac0142b8ad5339c5b897ff486493"], ["created_at", "2015-04-10 12:18:49.655612"], ["updated_at", "2015-04-10 12:18:49.655612"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:18:50', '2015-04-10 12:18:50', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:50', '2015-04-10 12:18:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:50', '2015-04-10 12:18:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:50', '2015-04-10 12:18:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:18:50', '2015-04-10 12:18:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:18:50', '2015-04-10 12:18:50', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder -------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:19:52', '2015-04-10 12:19:52', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:52', '2015-04-10 12:19:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:52', '2015-04-10 12:19:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:52', '2015-04-10 12:19:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:52', '2015-04-10 12:19:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:19:52', '2015-04-10 12:19:52', 948421225)  (5.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 65ms (Views: 4.1ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "865416af3977c6bae05039035d049a98"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "865416af3977c6bae05039035d049a98"], ["created_at", "2015-04-10 12:19:52.312406"], ["updated_at", "2015-04-10 12:19:52.312406"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 12:19:52.321909"], ["updated_at", "2015-04-10 12:19:52.321909"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.4ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "739c8094a2257cb179c728cfcb0f5813"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "739c8094a2257cb179c728cfcb0f5813"], ["created_at", "2015-04-10 12:19:52.366308"], ["updated_at", "2015-04-10 12:19:52.366308"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 9ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5abf2471c04adfdb1dd3777a2005cda5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5abf2471c04adfdb1dd3777a2005cda5"], ["created_at", "2015-04-10 12:19:52.404372"], ["updated_at", "2015-04-10 12:19:52.404372"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "23a5e5e6959ab42713da0bcf00646497"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "23a5e5e6959ab42713da0bcf00646497"], ["created_at", "2015-04-10 12:19:52.407457"], ["updated_at", "2015-04-10 12:19:52.407457"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c4611c38249a0d076e581766dbfdda8a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c4611c38249a0d076e581766dbfdda8a"], ["created_at", "2015-04-10 12:19:52.414615"], ["updated_at", "2015-04-10 12:19:52.414615"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fac13c4a06b3395c89644b22e474ff92"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fac13c4a06b3395c89644b22e474ff92"], ["created_at", "2015-04-10 12:19:52.417389"], ["updated_at", "2015-04-10 12:19:52.417389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "53c5c48ac9834ae2180111de041d7412"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "53c5c48ac9834ae2180111de041d7412"], ["created_at", "2015-04-10 12:19:52.420963"], ["updated_at", "2015-04-10 12:19:52.420963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 12:19:52.431758"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:19:53', '2015-04-10 12:19:53', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:53', '2015-04-10 12:19:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:53', '2015-04-10 12:19:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:53', '2015-04-10 12:19:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:53', '2015-04-10 12:19:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:19:53', '2015-04-10 12:19:53', 948421225)  (0.7ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\ntarget_key: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 12:19:53.301259"], ["created_at", "2015-04-10 12:19:53.301699"], ["updated_at", "2015-04-10 12:19:53.301699"]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\ntarget_key: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 12:19:53.307674"], ["created_at", "2015-04-10 12:19:53.307870"], ["updated_at", "2015-04-10 12:19:53.307870"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:19:53.565612"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:19:53.595162"], ["created_at", "2015-04-10 12:19:53.595463"], ["updated_at", "2015-04-10 12:19:53.595463"]]  (0.8ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:19:54', '2015-04-10 12:19:54', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:54', '2015-04-10 12:19:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:54', '2015-04-10 12:19:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:54', '2015-04-10 12:19:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:54', '2015-04-10 12:19:54', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:19:54', '2015-04-10 12:19:54', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 12:19:54.684740"], ["updated_at", "2015-04-10 12:19:54.684740"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 12:19:54.691063"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 12:19:54.701342"], ["updated_at", "2015-04-10 12:19:54.701342"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:19:54.708086"], ["updated_at", "2015-04-10 12:19:54.708086"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 12:19:54.828546"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 12:20:04.832703"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 12:19:54'\n updated_at: &6 2015-04-10 12:19:54.828546000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 12:19:54'\n updated_at: '2015-04-10 12:19:54'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 12:19:54'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 12:19:54.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 12:19:54.876663"], ["updated_at", "2015-04-10 12:19:54.876663"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 12:19:55.201859"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 12:19:55.707574"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 12:20:05.711275"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 12:19:54'\n updated_at: &6 2015-04-10 12:19:55.707574000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 12:19:54'\n updated_at: '2015-04-10 12:19:55.201859'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 12:19:54'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 12:19:54.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 12:19:55.760992"], ["updated_at", "2015-04-10 12:19:55.760992"]]  (1.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:19:55', '2015-04-10 12:19:55', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:55', '2015-04-10 12:19:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:55', '2015-04-10 12:19:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:55', '2015-04-10 12:19:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:55', '2015-04-10 12:19:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:19:55', '2015-04-10 12:19:55', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 12:19:55.993043"], ["id", 431685987]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:19:56.003772"], ["updated_at", "2015-04-10 12:19:56.003772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:19:56.012716"], ["updated_at", "2015-04-10 12:19:56.012716"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 12:19:56.015433"], ["updated_at", "2015-04-10 12:19:56.015433"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 12:19:56.018900"], ["updated_at", "2015-04-10 12:19:56.018900"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 12:19:56.038645"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 7ms (Views: 2.8ms | ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:19:56', '2015-04-10 12:19:56', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:56', '2015-04-10 12:19:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:56', '2015-04-10 12:19:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:56', '2015-04-10 12:19:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:19:56', '2015-04-10 12:19:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:19:56', '2015-04-10 12:19:56', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 12:19:56.713818"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.3ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.7ms)  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:20:57', '2015-04-10 12:20:57', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:57', '2015-04-10 12:20:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:57', '2015-04-10 12:20:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:57', '2015-04-10 12:20:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:57', '2015-04-10 12:20:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:20:57', '2015-04-10 12:20:57', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 49ms (Views: 7.3ms | ActiveRecord: 0.6ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3a9a960f9fe5ac7f27bebc6bfde7fc0d"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "3a9a960f9fe5ac7f27bebc6bfde7fc0d"], ["created_at", "2015-04-10 12:20:57.884445"], ["updated_at", "2015-04-10 12:20:57.884445"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 12:20:57.894089"], ["updated_at", "2015-04-10 12:20:57.894089"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 12:20:58.067037"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 12:21:08.071605"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 12:20:57'\n updated_at: &6 2015-04-10 12:20:58.067037000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 12:20:57'\n updated_at: '2015-04-10 12:20:57'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 12:20:57'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 12:20:57.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 12:20:58.095916"], ["updated_at", "2015-04-10 12:20:58.095916"]]  (1.0ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 12:20:58.400482"], ["id", 538821867]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 12:20:58.977232"], ["id", 538821867]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 12:21:08.981817"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 12:20:57'\n updated_at: &6 2015-04-10 12:20:58.977232000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 12:20:57'\n updated_at: '2015-04-10 12:20:58.400482'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 12:20:57'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 12:20:57.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 12:20:59.005011"], ["updated_at", "2015-04-10 12:20:59.005011"]]  (1.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:20:59', '2015-04-10 12:20:59', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5a86067880fd241c95e60d5d89d3c178"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5a86067880fd241c95e60d5d89d3c178"], ["created_at", "2015-04-10 12:20:59.195157"], ["updated_at", "2015-04-10 12:20:59.195157"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cdc2d0af468fe2f7e8abf4cfeed3d081"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cdc2d0af468fe2f7e8abf4cfeed3d081"], ["created_at", "2015-04-10 12:20:59.199106"], ["updated_at", "2015-04-10 12:20:59.199106"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "69af2973420cd75eed0eeb1b43bc37fa"]] SQL (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "69af2973420cd75eed0eeb1b43bc37fa"], ["created_at", "2015-04-10 12:20:59.207017"], ["updated_at", "2015-04-10 12:20:59.207017"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4527b30525cc59043abca46f35f960e4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4527b30525cc59043abca46f35f960e4"], ["created_at", "2015-04-10 12:20:59.212559"], ["updated_at", "2015-04-10 12:20:59.212559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f1b109b357794f697ca7b51b23b72577"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f1b109b357794f697ca7b51b23b72577"], ["created_at", "2015-04-10 12:20:59.236110"], ["updated_at", "2015-04-10 12:20:59.236110"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 12:20:59.253251"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:20:59.372654"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 12:20:59.393027"], ["created_at", "2015-04-10 12:20:59.393320"], ["updated_at", "2015-04-10 12:20:59.393320"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:20:59', '2015-04-10 12:20:59', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 98413728, 245026679, 784085492) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:20:59', '2015-04-10 12:20:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:20:59', '2015-04-10 12:20:59', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5f86ef85e92d9f6ec093608529ad2401"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "5f86ef85e92d9f6ec093608529ad2401"], ["created_at", "2015-04-10 12:20:59.594837"], ["updated_at", "2015-04-10 12:20:59.594837"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\ntarget_key: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 12:20:59.751281"], ["created_at", "2015-04-10 12:20:59.751697"], ["updated_at", "2015-04-10 12:20:59.751697"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\ntarget_key: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 12:20:59.757250"], ["created_at", "2015-04-10 12:20:59.757455"], ["updated_at", "2015-04-10 12:20:59.757455"]]  (1.0ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:21:00.015141"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 12:21:00.037208"], ["created_at", "2015-04-10 12:21:00.037519"], ["updated_at", "2015-04-10 12:21:00.037519"]]  (0.8ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:21:01', '2015-04-10 12:21:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 12:21:01.175564"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 12:21:01.291875"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 12:21:01.316440"], ["created_at", "2015-04-10 12:21:01.316803"], ["updated_at", "2015-04-10 12:21:01.316803"]]  (1.2ms) commit transaction  (0.2ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 40ms (Views: 4.1ms | ActiveRecord: 3.9ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 12:21:01', '2015-04-10 12:21:01', 538821867) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 12:21:01', '2015-04-10 12:21:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 12:21:01', '2015-04-10 12:21:01', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 12:21:01.535650"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.0ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 12:21:01.551334"], ["updated_at", "2015-04-10 12:21:01.551334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 12:21:01.557865"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 12:21:01.564694"], ["updated_at", "2015-04-10 12:21:01.564694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:21:01.569442"], ["updated_at", "2015-04-10 12:21:01.569442"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 12:21:01.605052"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:21:01.610974"], ["updated_at", "2015-04-10 12:21:01.610974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 12:21:01.619136"], ["updated_at", "2015-04-10 12:21:01.619136"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 12:21:01.620620"], ["updated_at", "2015-04-10 12:21:01.620620"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 12:21:01.621746"], ["updated_at", "2015-04-10 12:21:01.621746"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:11:25', '2015-04-10 13:11:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 932543090) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:11:25', '2015-04-10 13:11:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:11:25', '2015-04-10 13:11:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:11:25', '2015-04-10 13:11:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:11:25', '2015-04-10 13:11:25', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:11:25', '2015-04-10 13:11:25', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 932543090]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 932543090]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 932543090]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 932543090]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:14:15', '2015-04-10 13:14:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:14:15', '2015-04-10 13:14:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:14:15', '2015-04-10 13:14:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:14:15', '2015-04-10 13:14:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:14:15', '2015-04-10 13:14:15', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:14:15', '2015-04-10 13:14:15', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:34:30', '2015-04-10 13:34:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 731805050) Fixture Delete (0.6ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:34:30', '2015-04-10 13:34:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:34:30', '2015-04-10 13:34:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:34:30', '2015-04-10 13:34:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:34:30', '2015-04-10 13:34:30', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:34:30', '2015-04-10 13:34:30', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:35:16', '2015-04-10 13:35:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:16', '2015-04-10 13:35:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:16', '2015-04-10 13:35:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:16', '2015-04-10 13:35:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:16', '2015-04-10 13:35:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:35:16', '2015-04-10 13:35:16', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:35:49', '2015-04-10 13:35:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:49', '2015-04-10 13:35:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:49', '2015-04-10 13:35:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:49', '2015-04-10 13:35:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:35:49', '2015-04-10 13:35:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:35:49', '2015-04-10 13:35:49', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 517391740) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:37:50', '2015-04-10 13:37:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:37:50', '2015-04-10 13:37:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:37:50', '2015-04-10 13:37:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:37:50', '2015-04-10 13:37:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:37:50', '2015-04-10 13:37:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:37:50', '2015-04-10 13:37:50', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:39:10', '2015-04-10 13:39:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:10', '2015-04-10 13:39:10', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:10', '2015-04-10 13:39:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:10', '2015-04-10 13:39:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:10', '2015-04-10 13:39:10', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:39:10', '2015-04-10 13:39:10', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (2.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 517391740) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:39:32', '2015-04-10 13:39:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:32', '2015-04-10 13:39:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:32', '2015-04-10 13:39:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:32', '2015-04-10 13:39:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:39:32', '2015-04-10 13:39:32', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:39:32', '2015-04-10 13:39:32', 948421225)  (4.6ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:40:35', '2015-04-10 13:40:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:40:35', '2015-04-10 13:40:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:40:35', '2015-04-10 13:40:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:40:35', '2015-04-10 13:40:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:40:35', '2015-04-10 13:40:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:40:35', '2015-04-10 13:40:35', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:41:34', '2015-04-10 13:41:34', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:41:34', '2015-04-10 13:41:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:41:34', '2015-04-10 13:41:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:41:34', '2015-04-10 13:41:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:41:34', '2015-04-10 13:41:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:41:34', '2015-04-10 13:41:34', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 183950720) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:42:11', '2015-04-10 13:42:11', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:11', '2015-04-10 13:42:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:11', '2015-04-10 13:42:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:11', '2015-04-10 13:42:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:11', '2015-04-10 13:42:11', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:42:11', '2015-04-10 13:42:11', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:42:54', '2015-04-10 13:42:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:54', '2015-04-10 13:42:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:54', '2015-04-10 13:42:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:54', '2015-04-10 13:42:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:42:54', '2015-04-10 13:42:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:42:54', '2015-04-10 13:42:54', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.7ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:06', '2015-04-10 13:43:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:06', '2015-04-10 13:43:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:06', '2015-04-10 13:43:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:06', '2015-04-10 13:43:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:06', '2015-04-10 13:43:06', 779853880, 245026679, 431685987) Fixture Delete (0.8ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:06', '2015-04-10 13:43:06', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.7ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:20', '2015-04-10 13:43:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:20', '2015-04-10 13:43:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:20', '2015-04-10 13:43:20', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:20', '2015-04-10 13:43:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:20', '2015-04-10 13:43:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:20', '2015-04-10 13:43:20', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 13:43:20.163614"], ["created_at", "2015-04-10 13:43:20.164627"], ["updated_at", "2015-04-10 13:43:20.164627"]]  (0.7ms) commit transaction  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 13:43:20.170950"], ["created_at", "2015-04-10 13:43:20.171148"], ["updated_at", "2015-04-10 13:43:20.171148"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:43:20.421776"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 13:43:20.445026"], ["created_at", "2015-04-10 13:43:20.445315"], ["updated_at", "2015-04-10 13:43:20.445315"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:21', '2015-04-10 13:43:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 44ms (Views: 4.9ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.4ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d298d8f547cbe72b2a3d051946281a98"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "d298d8f547cbe72b2a3d051946281a98"], ["created_at", "2015-04-10 13:43:21.505582"], ["updated_at", "2015-04-10 13:43:21.505582"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 13:43:21.516573"], ["updated_at", "2015-04-10 13:43:21.516573"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.4ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:43:21.586979"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:43:21.685344"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:43:21.705971"], ["created_at", "2015-04-10 13:43:21.706260"], ["updated_at", "2015-04-10 13:43:21.706260"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 34ms (Views: 3.8ms | ActiveRecord: 3.4ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:21', '2015-04-10 13:43:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:21', '2015-04-10 13:43:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:21', '2015-04-10 13:43:21', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "071347844647d972867731e0a0c6b7e7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "071347844647d972867731e0a0c6b7e7"], ["created_at", "2015-04-10 13:43:21.903956"], ["updated_at", "2015-04-10 13:43:21.903956"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 15ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:24', '2015-04-10 13:43:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:43:24.412735"], ["updated_at", "2015-04-10 13:43:24.412735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:43:24.418107"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 13:43:24.424245"], ["updated_at", "2015-04-10 13:43:24.424245"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:43:24.426750"], ["updated_at", "2015-04-10 13:43:24.426750"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "61decc4bc176af623ed9b08cef7b73be"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "61decc4bc176af623ed9b08cef7b73be"], ["created_at", "2015-04-10 13:43:24.430196"], ["updated_at", "2015-04-10 13:43:24.430196"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dffa3504f4d8380aa6a3a8372007e7fb"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dffa3504f4d8380aa6a3a8372007e7fb"], ["created_at", "2015-04-10 13:43:24.433443"], ["updated_at", "2015-04-10 13:43:24.433443"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c33a7605361ea2fd13470fa78ced6ba1"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c33a7605361ea2fd13470fa78ced6ba1"], ["created_at", "2015-04-10 13:43:24.438630"], ["updated_at", "2015-04-10 13:43:24.438630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "50505ceaebb8a30665bfc5394db215b9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "50505ceaebb8a30665bfc5394db215b9"], ["created_at", "2015-04-10 13:43:24.442136"], ["updated_at", "2015-04-10 13:43:24.442136"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "683dcf61f5f5813c4deaa2fd1adb5c3b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "683dcf61f5f5813c4deaa2fd1adb5c3b"], ["created_at", "2015-04-10 13:43:24.446279"], ["updated_at", "2015-04-10 13:43:24.446279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:43:24.453484"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (1.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:43:24.563587"], ["id", 335514824]]  (5.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:43:24.596822"], ["created_at", "2015-04-10 13:43:24.597097"], ["updated_at", "2015-04-10 13:43:24.597097"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:24', '2015-04-10 13:43:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:24', '2015-04-10 13:43:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:24', '2015-04-10 13:43:24', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:43:26', '2015-04-10 13:43:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:26', '2015-04-10 13:43:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:26', '2015-04-10 13:43:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:26', '2015-04-10 13:43:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:43:26', '2015-04-10 13:43:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:43:26', '2015-04-10 13:43:26', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:43:26.045488"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:43:26.052697"], ["updated_at", "2015-04-10 13:43:26.052697"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:43:26.061685"], ["updated_at", "2015-04-10 13:43:26.061685"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 13:43:26.063264"], ["updated_at", "2015-04-10 13:43:26.063264"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 13:43:26.064822"], ["updated_at", "2015-04-10 13:43:26.064822"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 13:43:26.081690"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:44:06', '2015-04-10 13:44:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b02b71444c1914cb9f8ec361ac3c039a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b02b71444c1914cb9f8ec361ac3c039a"], ["created_at", "2015-04-10 13:44:06.185829"], ["updated_at", "2015-04-10 13:44:06.185829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7b1349940990e2ff23303abbf165b1fc"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7b1349940990e2ff23303abbf165b1fc"], ["created_at", "2015-04-10 13:44:06.198909"], ["updated_at", "2015-04-10 13:44:06.198909"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f47c21378c2ec88f0d942ab8c40e3cdd"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f47c21378c2ec88f0d942ab8c40e3cdd"], ["created_at", "2015-04-10 13:44:06.204324"], ["updated_at", "2015-04-10 13:44:06.204324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d9c02592e61c928f4dd6a6c185b47c88"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d9c02592e61c928f4dd6a6c185b47c88"], ["created_at", "2015-04-10 13:44:06.210047"], ["updated_at", "2015-04-10 13:44:06.210047"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4259e840f126c1706de9a2906ecb5c86"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4259e840f126c1706de9a2906ecb5c86"], ["created_at", "2015-04-10 13:44:06.215908"], ["updated_at", "2015-04-10 13:44:06.215908"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:44:06.228414"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:44:06.325768"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:44:06.347162"], ["created_at", "2015-04-10 13:44:06.347518"], ["updated_at", "2015-04-10 13:44:06.347518"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 701625837) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:44:06', '2015-04-10 13:44:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:06', '2015-04-10 13:44:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:44:06', '2015-04-10 13:44:06', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 13:44:06.678856"], ["created_at", "2015-04-10 13:44:06.679300"], ["updated_at", "2015-04-10 13:44:06.679300"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 13:44:06.685387"], ["created_at", "2015-04-10 13:44:06.685624"], ["updated_at", "2015-04-10 13:44:06.685624"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:44:06.921008"], ["id", 1039265257]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 13:44:06.945918"], ["created_at", "2015-04-10 13:44:06.946239"], ["updated_at", "2015-04-10 13:44:06.946239"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:44:08', '2015-04-10 13:44:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:08', '2015-04-10 13:44:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:08', '2015-04-10 13:44:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:08', '2015-04-10 13:44:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:08', '2015-04-10 13:44:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:44:08', '2015-04-10 13:44:08', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 39ms (Views: 4.6ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "195c20f750f1baddacf3dbb20d499cba"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "195c20f750f1baddacf3dbb20d499cba"], ["created_at", "2015-04-10 13:44:08.096156"], ["updated_at", "2015-04-10 13:44:08.096156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 13:44:08.107451"], ["updated_at", "2015-04-10 13:44:08.107451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:44:09', '2015-04-10 13:44:09', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:09', '2015-04-10 13:44:09', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:09', '2015-04-10 13:44:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:09', '2015-04-10 13:44:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:09', '2015-04-10 13:44:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:44:09', '2015-04-10 13:44:09', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:44:09.516101"], ["id", 538821867]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 13:44:19.520826"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 13:44:09'\n updated_at: &6 2015-04-10 13:44:09.516101000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 13:44:09'\n updated_at: '2015-04-10 13:44:09'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 13:44:09'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 13:44:09.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 13:44:09.555947"], ["updated_at", "2015-04-10 13:44:09.555947"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 13:44:09.793395"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:44:10.268878"], ["id", 538821867]]  (5.4ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 13:44:20.277759"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 13:44:09'\n updated_at: &6 2015-04-10 13:44:10.268878000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 13:44:09'\n updated_at: '2015-04-10 13:44:09.793395'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 13:44:09'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 13:44:09.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 13:44:10.316225"], ["updated_at", "2015-04-10 13:44:10.316225"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:44:10', '2015-04-10 13:44:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:44:10.552463"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:44:10.557943"], ["updated_at", "2015-04-10 13:44:10.557943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:44:10.564242"], ["updated_at", "2015-04-10 13:44:10.564242"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 13:44:10.565790"], ["updated_at", "2015-04-10 13:44:10.565790"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 13:44:10.567262"], ["updated_at", "2015-04-10 13:44:10.567262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:44:10.577060"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:44:10.703127"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:44:10.725614"], ["created_at", "2015-04-10 13:44:10.725904"], ["updated_at", "2015-04-10 13:44:10.725904"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 35ms (Views: 3.7ms | ActiveRecord: 3.4ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 701625837) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:44:10', '2015-04-10 13:44:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:44:10', '2015-04-10 13:44:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:44:10', '2015-04-10 13:44:10', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:44:10.980205"], ["updated_at", "2015-04-10 13:44:10.980205"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:44:10.985400"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 13:44:10.990773"], ["updated_at", "2015-04-10 13:44:10.990773"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:44:10.993997"], ["updated_at", "2015-04-10 13:44:10.993997"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 13:44:11.004667"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9b4c2bc6f954661d377f5cea2f486bbe"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "9b4c2bc6f954661d377f5cea2f486bbe"], ["created_at", "2015-04-10 13:44:11.020330"], ["updated_at", "2015-04-10 13:44:11.020330"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:47:55', '2015-04-10 13:47:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:47:55', '2015-04-10 13:47:55', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:56', '2015-04-10 13:47:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:56', '2015-04-10 13:47:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:56', '2015-04-10 13:47:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:56', '2015-04-10 13:47:56', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:47:56', '2015-04-10 13:47:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:47:56', '2015-04-10 13:47:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:47:56', '2015-04-10 13:47:56', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "23d850511f132839da19d50339e6ca07"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "23d850511f132839da19d50339e6ca07"], ["created_at", "2015-04-10 13:47:56.034283"], ["updated_at", "2015-04-10 13:47:56.034283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 21ms (ActiveRecord: 0.6ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 22ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:47:56.088594"], ["updated_at", "2015-04-10 13:47:56.088594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:47:56.094370"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 13:47:56.100073"], ["updated_at", "2015-04-10 13:47:56.100073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:47:56.102372"], ["updated_at", "2015-04-10 13:47:56.102372"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 13:47:56.226297"], ["created_at", "2015-04-10 13:47:56.226735"], ["updated_at", "2015-04-10 13:47:56.226735"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 13:47:56.233070"], ["created_at", "2015-04-10 13:47:56.233337"], ["updated_at", "2015-04-10 13:47:56.233337"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 183950720) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:47:57', '2015-04-10 13:47:57', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:57', '2015-04-10 13:47:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:57', '2015-04-10 13:47:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:57', '2015-04-10 13:47:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:57', '2015-04-10 13:47:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:47:57', '2015-04-10 13:47:57', 948421225)  (4.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:47:58.062084"], ["id", 538821867]]  (0.7ms) commit transaction  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 13:47:58.673278"], ["id", 538821867]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:47:59.168852"], ["id", 538821867]]  (0.7ms) commit transaction  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:47:59', '2015-04-10 13:47:59', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:59', '2015-04-10 13:47:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:59', '2015-04-10 13:47:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:59', '2015-04-10 13:47:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:47:59', '2015-04-10 13:47:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:47:59', '2015-04-10 13:47:59', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:47:59.718450"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:47:59.724401"], ["updated_at", "2015-04-10 13:47:59.724401"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:47:59.730285"], ["updated_at", "2015-04-10 13:47:59.730285"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 13:47:59.731515"], ["updated_at", "2015-04-10 13:47:59.731515"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 13:47:59.732722"], ["updated_at", "2015-04-10 13:47:59.732722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:01', '2015-04-10 13:48:01', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:48:01.377571"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 6ms (ActiveRecord: 1.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.1ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:01', '2015-04-10 13:48:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:01', '2015-04-10 13:48:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:01', '2015-04-10 13:48:01', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 500 Internal Server Error in 15ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "285cf5c4f686b48008e2df179dfc429d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "285cf5c4f686b48008e2df179dfc429d"], ["created_at", "2015-04-10 13:48:02.020807"], ["updated_at", "2015-04-10 13:48:02.020807"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 13:48:02.025062"], ["updated_at", "2015-04-10 13:48:02.025062"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.4ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "13997bdcc7f9d47e3b3522fece4492f6"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "13997bdcc7f9d47e3b3522fece4492f6"], ["created_at", "2015-04-10 13:48:02.052779"], ["updated_at", "2015-04-10 13:48:02.052779"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1195cdf4c1ebec8e34a27454edf46b1c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1195cdf4c1ebec8e34a27454edf46b1c"], ["created_at", "2015-04-10 13:48:02.055713"], ["updated_at", "2015-04-10 13:48:02.055713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "878747a66879eb16595e3c581de648e2"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "878747a66879eb16595e3c581de648e2"], ["created_at", "2015-04-10 13:48:02.060906"], ["updated_at", "2015-04-10 13:48:02.060906"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8970225a6b05559e3ad0255d5b127398"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8970225a6b05559e3ad0255d5b127398"], ["created_at", "2015-04-10 13:48:02.065475"], ["updated_at", "2015-04-10 13:48:02.065475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "df9cb71759c563ab7745df68b3208d14"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "df9cb71759c563ab7745df68b3208d14"], ["created_at", "2015-04-10 13:48:02.068793"], ["updated_at", "2015-04-10 13:48:02.068793"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:48:02.078272"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:02', '2015-04-10 13:48:02', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:02', '2015-04-10 13:48:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:02', '2015-04-10 13:48:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:02', '2015-04-10 13:48:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:02', '2015-04-10 13:48:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:02', '2015-04-10 13:48:02', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 2ms (ActiveRecord: 0.4ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 13:48:02.716827"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.4ms)  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:26', '2015-04-10 13:48:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:26', '2015-04-10 13:48:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:26', '2015-04-10 13:48:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:26', '2015-04-10 13:48:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:26', '2015-04-10 13:48:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:26', '2015-04-10 13:48:26', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:48:26.880164"], ["updated_at", "2015-04-10 13:48:26.880164"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:48:26.885545"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 13:48:26.899670"], ["updated_at", "2015-04-10 13:48:26.899670"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:48:26.904557"], ["updated_at", "2015-04-10 13:48:26.904557"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:48:27.002099"], ["id", 538821867]]  (0.9ms) commit transaction  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 13:48:27.552976"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:48:28.043461"], ["id", 538821867]]  (5.2ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:28', '2015-04-10 13:48:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:28', '2015-04-10 13:48:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:28', '2015-04-10 13:48:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:28', '2015-04-10 13:48:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:28', '2015-04-10 13:48:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:28', '2015-04-10 13:48:28', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 13:48:28.628236"], ["created_at", "2015-04-10 13:48:28.628703"], ["updated_at", "2015-04-10 13:48:28.628703"]]  (0.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 13:48:28.634373"], ["created_at", "2015-04-10 13:48:28.634543"], ["updated_at", "2015-04-10 13:48:28.634543"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:48:28.869743"], ["id", 1039265257]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 13:48:28.889845"], ["created_at", "2015-04-10 13:48:28.890229"], ["updated_at", "2015-04-10 13:48:28.890229"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.8ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:29', '2015-04-10 13:48:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:29', '2015-04-10 13:48:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:29', '2015-04-10 13:48:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:29', '2015-04-10 13:48:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:29', '2015-04-10 13:48:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:29', '2015-04-10 13:48:29', 948421225)  (5.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8f3c3005cb55efd743a342a366702f28"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8f3c3005cb55efd743a342a366702f28"], ["created_at", "2015-04-10 13:48:29.891284"], ["updated_at", "2015-04-10 13:48:29.891284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "33f973327337d73e48a0b5b9206cb551"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "33f973327337d73e48a0b5b9206cb551"], ["created_at", "2015-04-10 13:48:29.895159"], ["updated_at", "2015-04-10 13:48:29.895159"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "30dc7fcda342193a7f7636c3c78805b1"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "30dc7fcda342193a7f7636c3c78805b1"], ["created_at", "2015-04-10 13:48:29.900436"], ["updated_at", "2015-04-10 13:48:29.900436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "11fb36287284ce13dbe3a03eb7873cb9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "11fb36287284ce13dbe3a03eb7873cb9"], ["created_at", "2015-04-10 13:48:29.904296"], ["updated_at", "2015-04-10 13:48:29.904296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "12887551838527b99b92fe952fbf881b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "12887551838527b99b92fe952fbf881b"], ["created_at", "2015-04-10 13:48:29.908054"], ["updated_at", "2015-04-10 13:48:29.908054"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:48:29.915928"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:48:30.020834"], ["id", 335514824]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:48:30.069625"], ["created_at", "2015-04-10 13:48:30.069902"], ["updated_at", "2015-04-10 13:48:30.069902"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 433078596) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:30', '2015-04-10 13:48:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 42ms (Views: 3.5ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a76cf6ea27efb31b621a14b50fed0250"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "a76cf6ea27efb31b621a14b50fed0250"], ["created_at", "2015-04-10 13:48:30.300391"], ["updated_at", "2015-04-10 13:48:30.300391"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 13:48:30.306757"], ["updated_at", "2015-04-10 13:48:30.306757"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:48:30.340601"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:48:30.438416"], ["id", 335514824]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:48:30.463746"], ["created_at", "2015-04-10 13:48:30.464072"], ["updated_at", "2015-04-10 13:48:30.464072"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 38ms (Views: 3.3ms | ActiveRecord: 3.4ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:30', '2015-04-10 13:48:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:30', '2015-04-10 13:48:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:30', '2015-04-10 13:48:30', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 13:48:30.655970"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:48:30.672706"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:48:30.679078"], ["updated_at", "2015-04-10 13:48:30.679078"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:48:30.685879"], ["updated_at", "2015-04-10 13:48:30.685879"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 13:48:30.687246"], ["updated_at", "2015-04-10 13:48:30.687246"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 13:48:30.688665"], ["updated_at", "2015-04-10 13:48:30.688665"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "63d16c9589915ce8246baabcb7cf7572"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "63d16c9589915ce8246baabcb7cf7572"], ["created_at", "2015-04-10 13:48:30.696943"], ["updated_at", "2015-04-10 13:48:30.696943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:48:31', '2015-04-10 13:48:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:31', '2015-04-10 13:48:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:31', '2015-04-10 13:48:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:31', '2015-04-10 13:48:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:48:31', '2015-04-10 13:48:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:48:31', '2015-04-10 13:48:31', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:50:41', '2015-04-10 13:50:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:41', '2015-04-10 13:50:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:41', '2015-04-10 13:50:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:41', '2015-04-10 13:50:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:41', '2015-04-10 13:50:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:50:41', '2015-04-10 13:50:41', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 42ms (Views: 3.8ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ac4f70ce3116510b33275ea3a3da8ccf"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "ac4f70ce3116510b33275ea3a3da8ccf"], ["created_at", "2015-04-10 13:50:41.902774"], ["updated_at", "2015-04-10 13:50:41.902774"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 13:50:41.912002"], ["updated_at", "2015-04-10 13:50:41.912002"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 13:50:41.943431"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:50:42.066881"], ["id", 538821867]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 13:50:52.071204"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 13:50:41'\n updated_at: &6 2015-04-10 13:50:42.066881000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 13:50:41'\n updated_at: '2015-04-10 13:50:41'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 13:50:41'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 13:50:41.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 13:50:42.096712"], ["updated_at", "2015-04-10 13:50:42.096712"]]  (1.6ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 13:50:42.346152"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 13:50:42.853196"], ["id", 538821867]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 13:50:52.861799"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 13:50:41'\n updated_at: &6 2015-04-10 13:50:42.853196000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 13:50:41'\n updated_at: '2015-04-10 13:50:42.346152'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 13:50:41'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 13:50:41.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 13:50:42.887092"], ["updated_at", "2015-04-10 13:50:42.887092"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:50:43', '2015-04-10 13:50:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 245026679) Fixture Insert (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bee203677e975c767e85d7d1a85a5b17"]] SQL (1.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bee203677e975c767e85d7d1a85a5b17"], ["created_at", "2015-04-10 13:50:43.128400"], ["updated_at", "2015-04-10 13:50:43.128400"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7402eea30e043871be22533ce45da4a6"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7402eea30e043871be22533ce45da4a6"], ["created_at", "2015-04-10 13:50:43.138542"], ["updated_at", "2015-04-10 13:50:43.138542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (1.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "18d244327129bd25d3701407ff34f651"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "18d244327129bd25d3701407ff34f651"], ["created_at", "2015-04-10 13:50:43.149429"], ["updated_at", "2015-04-10 13:50:43.149429"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "474d49adf615b0c5f2f8cf6a04b42a75"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "474d49adf615b0c5f2f8cf6a04b42a75"], ["created_at", "2015-04-10 13:50:43.154010"], ["updated_at", "2015-04-10 13:50:43.154010"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "13698465863f3106c054f18b8c12abea"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "13698465863f3106c054f18b8c12abea"], ["created_at", "2015-04-10 13:50:43.159335"], ["updated_at", "2015-04-10 13:50:43.159335"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:50:43.184208"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:50:43.300493"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:50:43.326499"], ["created_at", "2015-04-10 13:50:43.326805"], ["updated_at", "2015-04-10 13:50:43.326805"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:50:43', '2015-04-10 13:50:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:43', '2015-04-10 13:50:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:50:43', '2015-04-10 13:50:43', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 13:50:43.630006"], ["created_at", "2015-04-10 13:50:43.630423"], ["updated_at", "2015-04-10 13:50:43.630423"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 13:50:43.636168"], ["created_at", "2015-04-10 13:50:43.636380"], ["updated_at", "2015-04-10 13:50:43.636380"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:50:43.855214"], ["id", 1039265257]]  (1.0ms) commit transaction  (0.2ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 13:50:43.876836"], ["created_at", "2015-04-10 13:50:43.877172"], ["updated_at", "2015-04-10 13:50:43.877172"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:50:44', '2015-04-10 13:50:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:44', '2015-04-10 13:50:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:44', '2015-04-10 13:50:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:44', '2015-04-10 13:50:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:44', '2015-04-10 13:50:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:50:44', '2015-04-10 13:50:44', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:50:44.864183"], ["updated_at", "2015-04-10 13:50:44.864183"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:50:44.869443"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 13:50:44.873728"], ["updated_at", "2015-04-10 13:50:44.873728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:50:44.876203"], ["updated_at", "2015-04-10 13:50:44.876203"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 13:50:44.905282"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 13:50:45.022797"], ["id", 335514824]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 13:50:45.042934"], ["created_at", "2015-04-10 13:50:45.043217"], ["updated_at", "2015-04-10 13:50:45.043217"]]  (1.0ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 32ms (Views: 3.4ms | ActiveRecord: 3.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:50:45', '2015-04-10 13:50:45', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:45', '2015-04-10 13:50:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:45', '2015-04-10 13:50:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:45', '2015-04-10 13:50:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:45', '2015-04-10 13:50:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:50:45', '2015-04-10 13:50:45', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4b4d561d66b04f30c03c00ed89a16a73"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "4b4d561d66b04f30c03c00ed89a16a73"], ["created_at", "2015-04-10 13:50:45.270113"], ["updated_at", "2015-04-10 13:50:45.270113"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.7ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 517391740) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:50:46', '2015-04-10 13:50:46', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:46', '2015-04-10 13:50:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:46', '2015-04-10 13:50:46', 849405871, 624739301, 819504217) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:46', '2015-04-10 13:50:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:50:46', '2015-04-10 13:50:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:50:46', '2015-04-10 13:50:46', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:50:46.731666"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.3ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:50:46.738861"], ["updated_at", "2015-04-10 13:50:46.738861"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:50:46.746562"], ["updated_at", "2015-04-10 13:50:46.746562"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 13:50:46.748147"], ["updated_at", "2015-04-10 13:50:46.748147"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 13:50:46.749547"], ["updated_at", "2015-04-10 13:50:46.749547"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:51:06', '2015-04-10 13:51:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:51:06', '2015-04-10 13:51:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:51:06', '2015-04-10 13:51:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:51:06', '2015-04-10 13:51:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:51:06', '2015-04-10 13:51:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 245026679) Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:51:06', '2015-04-10 13:51:06', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:51:06.769315"], ["updated_at", "2015-04-10 13:51:06.769315"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 13:51:06.775185"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 13:51:06.787907"], ["updated_at", "2015-04-10 13:51:06.787907"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 13:51:06.791254"], ["updated_at", "2015-04-10 13:51:06.791254"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 13:52:21', '2015-04-10 13:52:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:52:21', '2015-04-10 13:52:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:52:21', '2015-04-10 13:52:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:52:21', '2015-04-10 13:52:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 13:52:21', '2015-04-10 13:52:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 13:52:21', '2015-04-10 13:52:21', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 13:52:21.246237"], ["updated_at", "2015-04-10 13:52:21.246237"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 819504217) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:28:16', '2015-04-10 14:28:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:16', '2015-04-10 14:28:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:16', '2015-04-10 14:28:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:16', '2015-04-10 14:28:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:16', '2015-04-10 14:28:16', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:28:16', '2015-04-10 14:28:16', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 14:28:16.588455"], ["updated_at", "2015-04-10 14:28:16.588455"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:28:31', '2015-04-10 14:28:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:31', '2015-04-10 14:28:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:31', '2015-04-10 14:28:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:31', '2015-04-10 14:28:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:31', '2015-04-10 14:28:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:28:31', '2015-04-10 14:28:31', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 14:28:31.441055"], ["updated_at", "2015-04-10 14:28:31.441055"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:28:58', '2015-04-10 14:28:58', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:58', '2015-04-10 14:28:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:58', '2015-04-10 14:28:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:58', '2015-04-10 14:28:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:58', '2015-04-10 14:28:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:28:58', '2015-04-10 14:28:58', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e907b92d55f4b756d0d22dffc7fb449c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e907b92d55f4b756d0d22dffc7fb449c"], ["created_at", "2015-04-10 14:28:58.756608"], ["updated_at", "2015-04-10 14:28:58.756608"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "342908fff4436bf60c29f6822151c257"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "342908fff4436bf60c29f6822151c257"], ["created_at", "2015-04-10 14:28:58.760105"], ["updated_at", "2015-04-10 14:28:58.760105"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "18af5e455e1b8cc2a6bd6727f6d9a639"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "18af5e455e1b8cc2a6bd6727f6d9a639"], ["created_at", "2015-04-10 14:28:58.764886"], ["updated_at", "2015-04-10 14:28:58.764886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "abaa90e6cda958f2e29d15e29d229278"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "abaa90e6cda958f2e29d15e29d229278"], ["created_at", "2015-04-10 14:28:58.768147"], ["updated_at", "2015-04-10 14:28:58.768147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d4e95a80432ec1589933a37312ea6a38"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d4e95a80432ec1589933a37312ea6a38"], ["created_at", "2015-04-10 14:28:58.772298"], ["updated_at", "2015-04-10 14:28:58.772298"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 14:28:58.789718"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 14:28:58.912165"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 14:28:58.933282"], ["created_at", "2015-04-10 14:28:58.933630"], ["updated_at", "2015-04-10 14:28:58.933630"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:28:59', '2015-04-10 14:28:59', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 14:28:59.109568"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 4.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 14:28:59.126298"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 14:28:59.235366"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 14:28:59.257061"], ["created_at", "2015-04-10 14:28:59.257633"], ["updated_at", "2015-04-10 14:28:59.257633"]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 36ms (Views: 3.3ms | ActiveRecord: 3.7ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:28:59', '2015-04-10 14:28:59', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:28:59', '2015-04-10 14:28:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:28:59', '2015-04-10 14:28:59', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 14:28:59.462279"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 14:28:59.468570"], ["updated_at", "2015-04-10 14:28:59.468570"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 14:28:59.475843"], ["updated_at", "2015-04-10 14:28:59.475843"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 14:28:59.477756"], ["updated_at", "2015-04-10 14:28:59.477756"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 14:28:59.479435"], ["updated_at", "2015-04-10 14:28:59.479435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:29:00', '2015-04-10 14:29:00', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:00', '2015-04-10 14:29:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:00', '2015-04-10 14:29:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:00', '2015-04-10 14:29:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:00', '2015-04-10 14:29:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:29:00', '2015-04-10 14:29:00', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 14:29:00.835585"], ["updated_at", "2015-04-10 14:29:00.835585"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 14:29:00.840183"], ["id", 701625837]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 14:29:00.846018"], ["updated_at", "2015-04-10 14:29:00.846018"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 14:29:00.849711"], ["updated_at", "2015-04-10 14:29:00.849711"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 14:29:00.944017"], ["id", 538821867]]  (1.1ms) commit transaction  (0.4ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 14:29:10.948483"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 14:29:00'\n updated_at: &6 2015-04-10 14:29:00.944017000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 14:29:00'\n updated_at: '2015-04-10 14:29:00'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 14:29:00'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 14:29:00.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 14:29:00.976045"], ["updated_at", "2015-04-10 14:29:00.976045"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 14:29:01.216622"], ["id", 538821867]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.8ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 14:29:01.716040"], ["id", 538821867]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 14:29:11.725369"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 14:29:00'\n updated_at: &6 2015-04-10 14:29:01.716040000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 14:29:00'\n updated_at: '2015-04-10 14:29:01.216622'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 14:29:00'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 14:29:00.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 14:29:01.759444"], ["updated_at", "2015-04-10 14:29:01.759444"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:29:01', '2015-04-10 14:29:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:01', '2015-04-10 14:29:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:01', '2015-04-10 14:29:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:01', '2015-04-10 14:29:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:01', '2015-04-10 14:29:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:29:01', '2015-04-10 14:29:01', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 14:29:02.051194"], ["created_at", "2015-04-10 14:29:02.051849"], ["updated_at", "2015-04-10 14:29:02.051849"]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 14:29:02.059004"], ["created_at", "2015-04-10 14:29:02.059265"], ["updated_at", "2015-04-10 14:29:02.059265"]]  (0.9ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 14:29:02.306920"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 14:29:02.328092"], ["created_at", "2015-04-10 14:29:02.328413"], ["updated_at", "2015-04-10 14:29:02.328413"]]  (6.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:29:03', '2015-04-10 14:29:03', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:03', '2015-04-10 14:29:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:03', '2015-04-10 14:29:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:03', '2015-04-10 14:29:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:29:03', '2015-04-10 14:29:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:29:03', '2015-04-10 14:29:03', 948421225)  (1.0ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "171d77a519071562a4be34de058d1ec4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "171d77a519071562a4be34de058d1ec4"], ["created_at", "2015-04-10 14:29:03.409804"], ["updated_at", "2015-04-10 14:29:03.409804"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 3.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a724a2041e4930755633aee104a43fdd"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "a724a2041e4930755633aee104a43fdd"], ["created_at", "2015-04-10 14:29:03.476841"], ["updated_at", "2015-04-10 14:29:03.476841"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 14:29:03.479798"], ["updated_at", "2015-04-10 14:29:03.479798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:30:48', '2015-04-10 14:30:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:48', '2015-04-10 14:30:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:48', '2015-04-10 14:30:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:48', '2015-04-10 14:30:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:48', '2015-04-10 14:30:48', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:30:48', '2015-04-10 14:30:48', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6f5b150dc7a80027f8054dea18e6a667"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "6f5b150dc7a80027f8054dea18e6a667"], ["created_at", "2015-04-10 14:30:48.824579"], ["updated_at", "2015-04-10 14:30:48.824579"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 23ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:30:50', '2015-04-10 14:30:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:50', '2015-04-10 14:30:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:50', '2015-04-10 14:30:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:50', '2015-04-10 14:30:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:50', '2015-04-10 14:30:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:30:50', '2015-04-10 14:30:50', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 14:30:50.193357"], ["id", 538821867]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 14:31:00.199384"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-10 14:30:50'\n updated_at: &6 2015-04-10 14:30:50.193357000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-10 14:30:50'\n updated_at: '2015-04-10 14:30:50'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 14:30:50'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 14:30:50.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 14:30:50.227201"], ["updated_at", "2015-04-10 14:30:50.227201"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-10 14:30:50.458447"], ["id", 538821867]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-10 14:30:50.913855"], ["id", 538821867]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-10 14:31:00.923629"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-10 14:30:50'\n updated_at: &6 2015-04-10 14:30:50.913855000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-10 14:30:50'\n updated_at: '2015-04-10 14:30:50.458447'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-10 14:30:50'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-10 14:30:50.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-10 14:30:50.949944"], ["updated_at", "2015-04-10 14:30:50.949944"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 785871319) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:30:51', '2015-04-10 14:30:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:51', '2015-04-10 14:30:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:51', '2015-04-10 14:30:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:51', '2015-04-10 14:30:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:51', '2015-04-10 14:30:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:30:51', '2015-04-10 14:30:51', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 34ms (Views: 3.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cdd2875d44b2f646c5d74db7b750998c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "cdd2875d44b2f646c5d74db7b750998c"], ["created_at", "2015-04-10 14:30:51.177305"], ["updated_at", "2015-04-10 14:30:51.177305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-10 14:30:51.187920"], ["updated_at", "2015-04-10 14:30:51.187920"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-10 14:30:51.325571"], ["created_at", "2015-04-10 14:30:51.326120"], ["updated_at", "2015-04-10 14:30:51.326120"]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-10 14:30:51.331126"], ["created_at", "2015-04-10 14:30:51.331295"], ["updated_at", "2015-04-10 14:30:51.331295"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 14:30:51.578836"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-10 14:30:51.600637"], ["created_at", "2015-04-10 14:30:51.600964"], ["updated_at", "2015-04-10 14:30:51.600964"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 1039265257) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:30:52', '2015-04-10 14:30:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 948421225)  (5.0ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e62c72cc2913f91adb608c60b64d9ef1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e62c72cc2913f91adb608c60b64d9ef1"], ["created_at", "2015-04-10 14:30:52.675896"], ["updated_at", "2015-04-10 14:30:52.675896"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d4820197374110e7f8a514239a3a5f14"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d4820197374110e7f8a514239a3a5f14"], ["created_at", "2015-04-10 14:30:52.679161"], ["updated_at", "2015-04-10 14:30:52.679161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b3f371a701ce6ae4a6bb4cfd7e40f93d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b3f371a701ce6ae4a6bb4cfd7e40f93d"], ["created_at", "2015-04-10 14:30:52.684614"], ["updated_at", "2015-04-10 14:30:52.684614"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f0ca8bfb005178aacbe48077d29cc7c3"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f0ca8bfb005178aacbe48077d29cc7c3"], ["created_at", "2015-04-10 14:30:52.687562"], ["updated_at", "2015-04-10 14:30:52.687562"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "99b28bc31e4639dc9cee04c393a4addc"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "99b28bc31e4639dc9cee04c393a4addc"], ["created_at", "2015-04-10 14:30:52.691743"], ["updated_at", "2015-04-10 14:30:52.691743"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 14:30:52.698707"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 14:30:52.795689"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 14:30:52.818326"], ["created_at", "2015-04-10 14:30:52.818715"], ["updated_at", "2015-04-10 14:30:52.818715"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:30:52', '2015-04-10 14:30:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:52', '2015-04-10 14:30:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:30:52', '2015-04-10 14:30:52', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 14:30:52.987439"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 14:30:52.993166"], ["updated_at", "2015-04-10 14:30:52.993166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 14:30:52.999699"], ["updated_at", "2015-04-10 14:30:52.999699"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-10 14:30:53.001048"], ["updated_at", "2015-04-10 14:30:53.001048"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-10 14:30:53.002205"], ["updated_at", "2015-04-10 14:30:53.002205"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-10 14:30:53.010343"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-10 14:30:53.116112"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-10 14:30:53.142762"], ["created_at", "2015-04-10 14:30:53.143094"], ["updated_at", "2015-04-10 14:30:53.143094"]]  (1.1ms) commit transaction  (0.1ms) begin transaction  (0.5ms) commit transaction Completed 200 OK in 42ms (Views: 4.2ms | ActiveRecord: 4.2ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-10 14:30:53', '2015-04-10 14:30:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:53', '2015-04-10 14:30:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:53', '2015-04-10 14:30:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:53', '2015-04-10 14:30:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-10 14:30:53', '2015-04-10 14:30:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-10 14:30:53', '2015-04-10 14:30:53', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-10 14:30:53.373921"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-10 14:30:53.389410"], ["updated_at", "2015-04-10 14:30:53.389410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-10 14:30:53.394259"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-10 14:30:53.398376"], ["updated_at", "2015-04-10 14:30:53.398376"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-10 14:30:53.400552"], ["updated_at", "2015-04-10 14:30:53.400552"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:14', '2015-04-13 09:43:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:14', '2015-04-13 09:43:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:14', '2015-04-13 09:43:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:14', '2015-04-13 09:43:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:14', '2015-04-13 09:43:14', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:14', '2015-04-13 09:43:14', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-13 09:43:14.990757"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.8ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:18', '2015-04-13 09:43:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "77162c0881df0727b5642eeccb001647"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "77162c0881df0727b5642eeccb001647"], ["created_at", "2015-04-13 09:43:18.523838"], ["updated_at", "2015-04-13 09:43:18.523838"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 15ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-13 09:43:18.573175"], ["updated_at", "2015-04-13 09:43:18.573175"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-13 09:43:18.578488"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-13 09:43:18.582281"], ["updated_at", "2015-04-13 09:43:18.582281"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-13 09:43:18.584520"], ["updated_at", "2015-04-13 09:43:18.584520"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "896835392ca83072de8f52bbd3b11064"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "896835392ca83072de8f52bbd3b11064"], ["created_at", "2015-04-13 09:43:18.588210"], ["updated_at", "2015-04-13 09:43:18.588210"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e4b62fbd34773a2e0c791bdcb270568b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e4b62fbd34773a2e0c791bdcb270568b"], ["created_at", "2015-04-13 09:43:18.591065"], ["updated_at", "2015-04-13 09:43:18.591065"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e0adcb8bf0771649f567023a6b5ad2c5"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e0adcb8bf0771649f567023a6b5ad2c5"], ["created_at", "2015-04-13 09:43:18.597391"], ["updated_at", "2015-04-13 09:43:18.597391"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9a40fc3789dc1d0975d7731b1d741056"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9a40fc3789dc1d0975d7731b1d741056"], ["created_at", "2015-04-13 09:43:18.600363"], ["updated_at", "2015-04-13 09:43:18.600363"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7bb6696899aa0247c54fc3e0f13ee73b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7bb6696899aa0247c54fc3e0f13ee73b"], ["created_at", "2015-04-13 09:43:18.603990"], ["updated_at", "2015-04-13 09:43:18.603990"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-13 09:43:18.611072"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-13 09:43:18.711701"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-13 09:43:18.733652"], ["created_at", "2015-04-13 09:43:18.733923"], ["updated_at", "2015-04-13 09:43:18.733923"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:18', '2015-04-13 09:43:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:18', '2015-04-13 09:43:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:18', '2015-04-13 09:43:18', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-13 09:43:18.930065"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-13 09:43:18.936784"], ["updated_at", "2015-04-13 09:43:18.936784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-13 09:43:18.943736"], ["updated_at", "2015-04-13 09:43:18.943736"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-13 09:43:18.944877"], ["updated_at", "2015-04-13 09:43:18.944877"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-13 09:43:18.945922"], ["updated_at", "2015-04-13 09:43:18.945922"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-13 09:43:18.980417"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-13 09:43:19.091241"], ["id", 335514824]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-13 09:43:19.118717"], ["created_at", "2015-04-13 09:43:19.119070"], ["updated_at", "2015-04-13 09:43:19.119070"]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 41ms (Views: 4.1ms | ActiveRecord: 3.6ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:19', '2015-04-13 09:43:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:19', '2015-04-13 09:43:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:19', '2015-04-13 09:43:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:19', '2015-04-13 09:43:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:19', '2015-04-13 09:43:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:19', '2015-04-13 09:43:19', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-13 09:43:19.404881"], ["created_at", "2015-04-13 09:43:19.405468"], ["updated_at", "2015-04-13 09:43:19.405468"]]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-13 09:43:19.412701"], ["created_at", "2015-04-13 09:43:19.412923"], ["updated_at", "2015-04-13 09:43:19.412923"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-13 09:43:19.698101"], ["id", 1039265257]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-13 09:43:19.725100"], ["created_at", "2015-04-13 09:43:19.725398"], ["updated_at", "2015-04-13 09:43:19.725398"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:20', '2015-04-13 09:43:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:20', '2015-04-13 09:43:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:20', '2015-04-13 09:43:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:20', '2015-04-13 09:43:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:20', '2015-04-13 09:43:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:20', '2015-04-13 09:43:20', 948421225)  (5.3ms) commit transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-13 09:43:20.866968"], ["id", 538821867]]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-13 09:43:30.871378"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-13 09:43:20'\n updated_at: &6 2015-04-13 09:43:20.866968000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-13 09:43:20'\n updated_at: '2015-04-13 09:43:20'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-13 09:43:20'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-13 09:43:20.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-13 09:43:20.899375"], ["updated_at", "2015-04-13 09:43:20.899375"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-13 09:43:21.187644"], ["id", 538821867]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-13 09:43:21.819220"], ["id", 538821867]]  (5.2ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-13 09:43:31.827549"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-13 09:43:20'\n updated_at: &6 2015-04-13 09:43:21.819220000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-13 09:43:20'\n updated_at: '2015-04-13 09:43:21.187644'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-13 09:43:20'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-13 09:43:20.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-13 09:43:21.855038"], ["updated_at", "2015-04-13 09:43:21.855038"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:22', '2015-04-13 09:43:22', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:22', '2015-04-13 09:43:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:22', '2015-04-13 09:43:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:22', '2015-04-13 09:43:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:22', '2015-04-13 09:43:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:22', '2015-04-13 09:43:22', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 16ms (Views: 4.3ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9723fda526226320af1760439e97b85c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "9723fda526226320af1760439e97b85c"], ["created_at", "2015-04-13 09:43:22.115713"], ["updated_at", "2015-04-13 09:43:22.115713"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-13 09:43:22.119327"], ["updated_at", "2015-04-13 09:43:22.119327"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 11ms (Views: 5.9ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:29', '2015-04-13 09:43:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-13 09:43:29.149379"], ["updated_at", "2015-04-13 09:43:29.149379"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-13 09:43:29.153806"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-13 09:43:29.176522"], ["updated_at", "2015-04-13 09:43:29.176522"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-13 09:43:29.180007"], ["updated_at", "2015-04-13 09:43:29.180007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-13 09:43:29.194290"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d95a1ade30a9b9acc6c6d991881324ec"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d95a1ade30a9b9acc6c6d991881324ec"], ["created_at", "2015-04-13 09:43:29.203636"], ["updated_at", "2015-04-13 09:43:29.203636"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a5d567581b2300943486838372f1a0bd"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a5d567581b2300943486838372f1a0bd"], ["created_at", "2015-04-13 09:43:29.207015"], ["updated_at", "2015-04-13 09:43:29.207015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "38484fd1d3509a402d438edf611f3d7a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "38484fd1d3509a402d438edf611f3d7a"], ["created_at", "2015-04-13 09:43:29.214041"], ["updated_at", "2015-04-13 09:43:29.214041"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "48e0579925fe8d4e77fd2b5fddd21b2c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "48e0579925fe8d4e77fd2b5fddd21b2c"], ["created_at", "2015-04-13 09:43:29.217180"], ["updated_at", "2015-04-13 09:43:29.217180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "479a2e3c279de394265a886e32e61fcb"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "479a2e3c279de394265a886e32e61fcb"], ["created_at", "2015-04-13 09:43:29.220714"], ["updated_at", "2015-04-13 09:43:29.220714"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-13 09:43:29.227848"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-13 09:43:29.319527"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-13 09:43:29.344404"], ["created_at", "2015-04-13 09:43:29.344734"], ["updated_at", "2015-04-13 09:43:29.344734"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:29', '2015-04-13 09:43:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-13 09:43:29.531098"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-13 09:43:29.635338"], ["id", 335514824]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-13 09:43:29.661290"], ["created_at", "2015-04-13 09:43:29.661674"], ["updated_at", "2015-04-13 09:43:29.661674"]]  (1.3ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 41ms (Views: 5.3ms | ActiveRecord: 3.9ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:29', '2015-04-13 09:43:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:29', '2015-04-13 09:43:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:29', '2015-04-13 09:43:29', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 4.2ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "23bff053e9a33d22d66986520bcf6989"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "23bff053e9a33d22d66986520bcf6989"], ["created_at", "2015-04-13 09:43:29.891694"], ["updated_at", "2015-04-13 09:43:29.891694"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-13 09:43:29.898020"], ["updated_at", "2015-04-13 09:43:29.898020"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-13 09:43:30.019846"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-13 09:43:40.023739"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-13 09:43:29'\n updated_at: &6 2015-04-13 09:43:30.019846000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-13 09:43:29'\n updated_at: '2015-04-13 09:43:29'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-13 09:43:29'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-13 09:43:29.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-13 09:43:30.058564"], ["updated_at", "2015-04-13 09:43:30.058564"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-13 09:43:30.286594"], ["id", 538821867]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-13 09:43:30.769176"], ["id", 538821867]]  (5.0ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-13 09:43:40.777227"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-13 09:43:29'\n updated_at: &6 2015-04-13 09:43:30.769176000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-13 09:43:29'\n updated_at: '2015-04-13 09:43:30.286594'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-13 09:43:29'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-13 09:43:29.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-13 09:43:30.807416"], ["updated_at", "2015-04-13 09:43:30.807416"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:30', '2015-04-13 09:43:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:30', '2015-04-13 09:43:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:30', '2015-04-13 09:43:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:30', '2015-04-13 09:43:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:30', '2015-04-13 09:43:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:30', '2015-04-13 09:43:30', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-13 09:43:30.975554"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-13 09:43:30.981972"], ["updated_at", "2015-04-13 09:43:30.981972"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-13 09:43:30.988420"], ["updated_at", "2015-04-13 09:43:30.988420"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-13 09:43:30.989567"], ["updated_at", "2015-04-13 09:43:30.989567"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-13 09:43:30.990702"], ["updated_at", "2015-04-13 09:43:30.990702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-13 09:43:31.119486"], ["created_at", "2015-04-13 09:43:31.119863"], ["updated_at", "2015-04-13 09:43:31.119863"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-13 09:43:31.124822"], ["created_at", "2015-04-13 09:43:31.125028"], ["updated_at", "2015-04-13 09:43:31.125028"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-13 09:43:31.411214"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-13 09:43:31.432416"], ["created_at", "2015-04-13 09:43:31.432721"], ["updated_at", "2015-04-13 09:43:31.432721"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:32', '2015-04-13 09:43:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:32', '2015-04-13 09:43:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:32', '2015-04-13 09:43:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:32', '2015-04-13 09:43:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:32', '2015-04-13 09:43:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:32', '2015-04-13 09:43:32', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-13 09:43:35', '2015-04-13 09:43:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:35', '2015-04-13 09:43:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:35', '2015-04-13 09:43:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:35', '2015-04-13 09:43:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-13 09:43:35', '2015-04-13 09:43:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-13 09:43:35', '2015-04-13 09:43:35', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c79a2244ed12d25618351f61cc023311"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "c79a2244ed12d25618351f61cc023311"], ["created_at", "2015-04-13 09:43:35.477926"], ["updated_at", "2015-04-13 09:43:35.477926"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-16 08:47:08', '2015-04-16 08:47:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:08', '2015-04-16 08:47:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:08', '2015-04-16 08:47:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:08', '2015-04-16 08:47:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:08', '2015-04-16 08:47:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-16 08:47:08', '2015-04-16 08:47:08', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-16 08:47:08.855086"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 2.1ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-16 08:47:08.975541"], ["id", 335514824]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-16 08:47:08.998691"], ["created_at", "2015-04-16 08:47:08.999380"], ["updated_at", "2015-04-16 08:47:08.999380"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 40ms (Views: 5.6ms | ActiveRecord: 3.3ms)  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-16 08:47:09', '2015-04-16 08:47:09', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:09', '2015-04-16 08:47:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:09', '2015-04-16 08:47:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:09', '2015-04-16 08:47:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:09', '2015-04-16 08:47:09', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-16 08:47:09', '2015-04-16 08:47:09', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-16 08:47:10', '2015-04-16 08:47:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:10', '2015-04-16 08:47:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:10', '2015-04-16 08:47:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:10', '2015-04-16 08:47:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:10', '2015-04-16 08:47:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-16 08:47:10', '2015-04-16 08:47:10', 948421225)  (1.2ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-16 08:47:10.535525"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-16 08:47:10.548227"], ["updated_at", "2015-04-16 08:47:10.548227"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-16 08:47:10.557936"], ["updated_at", "2015-04-16 08:47:10.557936"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-16 08:47:10.559358"], ["updated_at", "2015-04-16 08:47:10.559358"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-16 08:47:10.560581"], ["updated_at", "2015-04-16 08:47:10.560581"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-16 08:47:10.740644"], ["created_at", "2015-04-16 08:47:10.741048"], ["updated_at", "2015-04-16 08:47:10.741048"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-16 08:47:10.746327"], ["created_at", "2015-04-16 08:47:10.746528"], ["updated_at", "2015-04-16 08:47:10.746528"]]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-16 08:47:11.074313"], ["id", 1039265257]]  (5.1ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-16 08:47:11.107184"], ["created_at", "2015-04-16 08:47:11.107525"], ["updated_at", "2015-04-16 08:47:11.107525"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-16 08:47:12', '2015-04-16 08:47:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:12', '2015-04-16 08:47:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:12', '2015-04-16 08:47:12', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:12', '2015-04-16 08:47:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:12', '2015-04-16 08:47:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-16 08:47:12', '2015-04-16 08:47:12', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 17ms (Views: 4.3ms | ActiveRecord: 0.8ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2f3942d5f1699bc5ee2fe82d4459dc9c"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "2f3942d5f1699bc5ee2fe82d4459dc9c"], ["created_at", "2015-04-16 08:47:12.408040"], ["updated_at", "2015-04-16 08:47:12.408040"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-16 08:47:12.413324"], ["updated_at", "2015-04-16 08:47:12.413324"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 2.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 5.5ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-16 08:47:12.557831"], ["id", 538821867]]  (1.2ms) commit transaction  (0.3ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-16 08:47:22.564223"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-16 08:47:12'\n updated_at: &6 2015-04-16 08:47:12.557831000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-16 08:47:12'\n updated_at: '2015-04-16 08:47:12'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-16 08:47:12'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-16 08:47:12.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-16 08:47:12.602098"], ["updated_at", "2015-04-16 08:47:12.602098"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-16 08:47:12.912387"], ["id", 538821867]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.2ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-16 08:47:13.561209"], ["id", 538821867]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-16 08:47:23.566161"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-16 08:47:12'\n updated_at: &6 2015-04-16 08:47:13.561209000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-16 08:47:12'\n updated_at: '2015-04-16 08:47:12.912387'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-16 08:47:12'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-16 08:47:12.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-16 08:47:13.595965"], ["updated_at", "2015-04-16 08:47:13.595965"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-16 08:47:13', '2015-04-16 08:47:13', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:13', '2015-04-16 08:47:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:13', '2015-04-16 08:47:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:13', '2015-04-16 08:47:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:13', '2015-04-16 08:47:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-16 08:47:13', '2015-04-16 08:47:13', 948421225)  (1.2ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (1.0ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-16 08:47:13.811854"], ["updated_at", "2015-04-16 08:47:13.811854"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.9ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-16 08:47:13.823669"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-16 08:47:13.831020"], ["updated_at", "2015-04-16 08:47:13.831020"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-16 08:47:13.835617"], ["updated_at", "2015-04-16 08:47:13.835617"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7cca69292ee1cc0decefe3e46502f8f5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7cca69292ee1cc0decefe3e46502f8f5"], ["created_at", "2015-04-16 08:47:13.840121"], ["updated_at", "2015-04-16 08:47:13.840121"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6a6fe6de951023c1c2dc4d02abc54c04"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6a6fe6de951023c1c2dc4d02abc54c04"], ["created_at", "2015-04-16 08:47:13.843625"], ["updated_at", "2015-04-16 08:47:13.843625"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0af26cae3de8de75690458aef7fc12ea"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0af26cae3de8de75690458aef7fc12ea"], ["created_at", "2015-04-16 08:47:13.850287"], ["updated_at", "2015-04-16 08:47:13.850287"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "77a52adfd63728a6fdc3f89ddc90053c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "77a52adfd63728a6fdc3f89ddc90053c"], ["created_at", "2015-04-16 08:47:13.855442"], ["updated_at", "2015-04-16 08:47:13.855442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "232137475b1c9c248198d52078f7fa78"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "232137475b1c9c248198d52078f7fa78"], ["created_at", "2015-04-16 08:47:13.861668"], ["updated_at", "2015-04-16 08:47:13.861668"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-16 08:47:13.872256"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-16 08:47:13.995729"], ["id", 335514824]]  (0.9ms) commit transaction  (0.2ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-16 08:47:14.022679"], ["created_at", "2015-04-16 08:47:14.022965"], ["updated_at", "2015-04-16 08:47:14.022965"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-16 08:47:14', '2015-04-16 08:47:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:14', '2015-04-16 08:47:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:14', '2015-04-16 08:47:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:14', '2015-04-16 08:47:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-16 08:47:14', '2015-04-16 08:47:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-16 08:47:14', '2015-04-16 08:47:14', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9b464bdb60b9e206e5ead1a001aa3865"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "9b464bdb60b9e206e5ead1a001aa3865"], ["created_at", "2015-04-16 08:47:14.244689"], ["updated_at", "2015-04-16 08:47:14.244689"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.9ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-16 08:47:14.293724"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:03:48', '2015-04-17 14:03:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:48', '2015-04-17 14:03:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:48', '2015-04-17 14:03:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:48', '2015-04-17 14:03:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:48', '2015-04-17 14:03:48', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:03:48', '2015-04-17 14:03:48', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:03:49', '2015-04-17 14:03:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:49', '2015-04-17 14:03:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:49', '2015-04-17 14:03:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:49', '2015-04-17 14:03:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:49', '2015-04-17 14:03:49', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:03:49', '2015-04-17 14:03:49', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 41ms (Views: 3.9ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c7df0ab06f47052c173b663d23968c48"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "c7df0ab06f47052c173b663d23968c48"], ["created_at", "2015-04-17 14:03:49.583866"], ["updated_at", "2015-04-17 14:03:49.583866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-17 14:03:49.596515"], ["updated_at", "2015-04-17 14:03:49.596515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.3ms)  (1.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:03:51', '2015-04-17 14:03:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:51', '2015-04-17 14:03:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:51', '2015-04-17 14:03:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:51', '2015-04-17 14:03:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:51', '2015-04-17 14:03:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:03:51', '2015-04-17 14:03:51', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.8ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-17 14:03:51.990422"], ["created_at", "2015-04-17 14:03:51.991180"], ["updated_at", "2015-04-17 14:03:51.991180"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-17 14:03:51.996983"], ["created_at", "2015-04-17 14:03:51.997185"], ["updated_at", "2015-04-17 14:03:51.997185"]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:03:52.213559"], ["id", 1039265257]]  (0.9ms) commit transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:03:53', '2015-04-17 14:03:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:53', '2015-04-17 14:03:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:53', '2015-04-17 14:03:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:53', '2015-04-17 14:03:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:53', '2015-04-17 14:03:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:03:53', '2015-04-17 14:03:53', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:03:53.502481"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:03:53.516365"], ["updated_at", "2015-04-17 14:03:53.516365"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:03:53.522179"], ["updated_at", "2015-04-17 14:03:53.522179"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-17 14:03:53.523253"], ["updated_at", "2015-04-17 14:03:53.523253"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-17 14:03:53.524387"], ["updated_at", "2015-04-17 14:03:53.524387"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "437a57128eb61c1b13548a07718678ab"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "437a57128eb61c1b13548a07718678ab"], ["created_at", "2015-04-17 14:03:53.557717"], ["updated_at", "2015-04-17 14:03:53.557717"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "15f2980ddaa6d553fcfbbc3a4b32c39f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "15f2980ddaa6d553fcfbbc3a4b32c39f"], ["created_at", "2015-04-17 14:03:53.560754"], ["updated_at", "2015-04-17 14:03:53.560754"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "300ba90b9dca6ebd388fd80d8eeab6ff"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "300ba90b9dca6ebd388fd80d8eeab6ff"], ["created_at", "2015-04-17 14:03:53.566030"], ["updated_at", "2015-04-17 14:03:53.566030"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5fd327bfa7b3ec52964f2e11df62bf34"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5fd327bfa7b3ec52964f2e11df62bf34"], ["created_at", "2015-04-17 14:03:53.568800"], ["updated_at", "2015-04-17 14:03:53.568800"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d74892f63f3a41c7e24399315bf98f78"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d74892f63f3a41c7e24399315bf98f78"], ["created_at", "2015-04-17 14:03:53.572660"], ["updated_at", "2015-04-17 14:03:53.572660"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:03:53.580616"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:03:53.681137"], ["id", 335514824]]  (0.7ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:03:54', '2015-04-17 14:03:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b5af52ec98cb633ce0174289fa733730"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "b5af52ec98cb633ce0174289fa733730"], ["created_at", "2015-04-17 14:03:54.144929"], ["updated_at", "2015-04-17 14:03:54.144929"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:03:54.192542"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:03:54.305292"], ["id", 335514824]]  (1.3ms) commit transaction Completed 500 Internal Server Error in 11ms (ActiveRecord: 1.9ms)  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:03:54', '2015-04-17 14:03:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:03:54', '2015-04-17 14:03:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:03:54', '2015-04-17 14:03:54', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-17 14:03:54.781170"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.7ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-17 14:03:54.801014"], ["updated_at", "2015-04-17 14:03:54.801014"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:03:54.805857"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-17 14:03:54.810089"], ["updated_at", "2015-04-17 14:03:54.810089"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:03:54.812612"], ["updated_at", "2015-04-17 14:03:54.812612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:04:27', '2015-04-17 14:04:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:27', '2015-04-17 14:04:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:27', '2015-04-17 14:04:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:27', '2015-04-17 14:04:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:27', '2015-04-17 14:04:27', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:04:27', '2015-04-17 14:04:27', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-17 14:04:27.349157"], ["created_at", "2015-04-17 14:04:27.349698"], ["updated_at", "2015-04-17 14:04:27.349698"]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-17 14:04:27.354622"], ["created_at", "2015-04-17 14:04:27.354804"], ["updated_at", "2015-04-17 14:04:27.354804"]]  (0.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:04:27.605650"], ["id", 1039265257]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ff288d51-6ce2-45eb-9b02-cf66ca141988) to Inline(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ff288d51-6ce2-45eb-9b02-cf66ca141988] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ff288d51-6ce2-45eb-9b02-cf66ca141988] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 721.02ms  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:04:29', '2015-04-17 14:04:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:29', '2015-04-17 14:04:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:29', '2015-04-17 14:04:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:29', '2015-04-17 14:04:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:29', '2015-04-17 14:04:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:04:29', '2015-04-17 14:04:29', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a818588a99f8464ff299c56c754c25ab"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "a818588a99f8464ff299c56c754c25ab"], ["created_at", "2015-04-17 14:04:29.697393"], ["updated_at", "2015-04-17 14:04:29.697393"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.5ms | ActiveRecord: 0.8ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 9ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cc954de0a9a145e82b63b75eb2f4213c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cc954de0a9a145e82b63b75eb2f4213c"], ["created_at", "2015-04-17 14:04:29.741698"], ["updated_at", "2015-04-17 14:04:29.741698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "45208f2329f2a305bc9ce29f30ca6936"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "45208f2329f2a305bc9ce29f30ca6936"], ["created_at", "2015-04-17 14:04:29.745064"], ["updated_at", "2015-04-17 14:04:29.745064"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f6c73f574d1dba981bbecaa480f8fe5e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f6c73f574d1dba981bbecaa480f8fe5e"], ["created_at", "2015-04-17 14:04:29.752365"], ["updated_at", "2015-04-17 14:04:29.752365"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9d6c4b8f489f5cd8373f9bb11b142025"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9d6c4b8f489f5cd8373f9bb11b142025"], ["created_at", "2015-04-17 14:04:29.756201"], ["updated_at", "2015-04-17 14:04:29.756201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "63b4f3864db48441d01e412cd4c22cfe"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "63b4f3864db48441d01e412cd4c22cfe"], ["created_at", "2015-04-17 14:04:29.761139"], ["updated_at", "2015-04-17 14:04:29.761139"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:04:29.773724"], ["id", 785871319]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:04:29.883275"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: d5f0aa7f-e4b8-4d85-a679-d29ac5921260) to Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d5f0aa7f-e4b8-4d85-a679-d29ac5921260] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d5f0aa7f-e4b8-4d85-a679-d29ac5921260] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 532.52ms  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:04:30', '2015-04-17 14:04:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:30', '2015-04-17 14:04:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:30', '2015-04-17 14:04:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:30', '2015-04-17 14:04:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:30', '2015-04-17 14:04:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:04:30', '2015-04-17 14:04:30', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-17 14:04:30.920919"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 33ms (Views: 4.0ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2fbd2f7847dec439a229881d6c9a0f6f"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "2fbd2f7847dec439a229881d6c9a0f6f"], ["created_at", "2015-04-17 14:04:30.983984"], ["updated_at", "2015-04-17 14:04:30.983984"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-17 14:04:30.992968"], ["updated_at", "2015-04-17 14:04:30.992968"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-17 14:04:31.044566"], ["updated_at", "2015-04-17 14:04:31.044566"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:04:31.049359"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-17 14:04:31.054256"], ["updated_at", "2015-04-17 14:04:31.054256"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:04:31.056822"], ["updated_at", "2015-04-17 14:04:31.056822"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5c68c264-bcc4-4882-aec3-36a4ecc751e1] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5c68c264-bcc4-4882-aec3-36a4ecc751e1]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5c68c264-bcc4-4882-aec3-36a4ecc751e1] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:04:31.174076"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5c68c264-bcc4-4882-aec3-36a4ecc751e1]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5c68c264-bcc4-4882-aec3-36a4ecc751e1] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 5c68c264-bcc4-4882-aec3-36a4ecc751e1) to Inline(default) at 2015-04-17 14:04:41 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5c68c264-bcc4-4882-aec3-36a4ecc751e1] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 8.94ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1879dd16-f941-42d1-b9a6-8bf8d415848a] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1879dd16-f941-42d1-b9a6-8bf8d415848a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1879dd16-f941-42d1-b9a6-8bf8d415848a] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-17 14:04:31.733471"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1879dd16-f941-42d1-b9a6-8bf8d415848a]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1879dd16-f941-42d1-b9a6-8bf8d415848a] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 5.8ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5bc470a6-9007-45ac-919c-129e99cfa909] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5bc470a6-9007-45ac-919c-129e99cfa909] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.28ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0c4a4253-afc0-4871-b0b0-15877b5bd5e8] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0c4a4253-afc0-4871-b0b0-15877b5bd5e8]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0c4a4253-afc0-4871-b0b0-15877b5bd5e8] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:04:32.328021"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0c4a4253-afc0-4871-b0b0-15877b5bd5e8]  (4.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0c4a4253-afc0-4871-b0b0-15877b5bd5e8] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 0c4a4253-afc0-4871-b0b0-15877b5bd5e8) to Inline(default) at 2015-04-17 14:04:42 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0c4a4253-afc0-4871-b0b0-15877b5bd5e8] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 10.32ms  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:04:32', '2015-04-17 14:04:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:32', '2015-04-17 14:04:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:32', '2015-04-17 14:04:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:32', '2015-04-17 14:04:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:32', '2015-04-17 14:04:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:04:32', '2015-04-17 14:04:32', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:04:32.805448"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:04:32.927869"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: db49c70a-cd58-4bc8-a970-28109286a955) to Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [db49c70a-cd58-4bc8-a970-28109286a955] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [db49c70a-cd58-4bc8-a970-28109286a955] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 529.0ms Completed 500 Internal Server Error in 556ms (ActiveRecord: 1.5ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:04:33', '2015-04-17 14:04:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:33', '2015-04-17 14:04:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:33', '2015-04-17 14:04:33', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:33', '2015-04-17 14:04:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:33', '2015-04-17 14:04:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:04:33', '2015-04-17 14:04:33', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:04:33.955743"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:04:33.962697"], ["updated_at", "2015-04-17 14:04:33.962697"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:04:33.969759"], ["updated_at", "2015-04-17 14:04:33.969759"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-17 14:04:33.971166"], ["updated_at", "2015-04-17 14:04:33.971166"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-17 14:04:33.972281"], ["updated_at", "2015-04-17 14:04:33.972281"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:04:35', '2015-04-17 14:04:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:35', '2015-04-17 14:04:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:35', '2015-04-17 14:04:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:35', '2015-04-17 14:04:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:04:35', '2015-04-17 14:04:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:04:35', '2015-04-17 14:04:35', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:10:11', '2015-04-17 14:10:11', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:11', '2015-04-17 14:10:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:11', '2015-04-17 14:10:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:11', '2015-04-17 14:10:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:11', '2015-04-17 14:10:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:10:11', '2015-04-17 14:10:11', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 40ms (Views: 3.4ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "14b96aed9f0b6e9e1344eb18cbb722e2"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "14b96aed9f0b6e9e1344eb18cbb722e2"], ["created_at", "2015-04-17 14:10:11.595158"], ["updated_at", "2015-04-17 14:10:11.595158"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-17 14:10:11.602917"], ["updated_at", "2015-04-17 14:10:11.602917"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6111bc434711945ed1075020e0387f4d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6111bc434711945ed1075020e0387f4d"], ["created_at", "2015-04-17 14:10:11.634597"], ["updated_at", "2015-04-17 14:10:11.634597"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5c2c5023b75ee1f2deb6710cfdc3c89e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5c2c5023b75ee1f2deb6710cfdc3c89e"], ["created_at", "2015-04-17 14:10:11.637433"], ["updated_at", "2015-04-17 14:10:11.637433"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ac1e2e7dc5d2335b58b31f8ecaa3ed26"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ac1e2e7dc5d2335b58b31f8ecaa3ed26"], ["created_at", "2015-04-17 14:10:11.642174"], ["updated_at", "2015-04-17 14:10:11.642174"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0497bc56a972f6e4734b497867016396"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0497bc56a972f6e4734b497867016396"], ["created_at", "2015-04-17 14:10:11.644726"], ["updated_at", "2015-04-17 14:10:11.644726"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "06bc5c0212f35e9a797a823d86f291b8"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "06bc5c0212f35e9a797a823d86f291b8"], ["created_at", "2015-04-17 14:10:11.648067"], ["updated_at", "2015-04-17 14:10:11.648067"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:10:11.660332"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:10:11.750890"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a141d0d8-2620-49f4-87ca-dd5966707b2d) to Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a141d0d8-2620-49f4-87ca-dd5966707b2d] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a141d0d8-2620-49f4-87ca-dd5966707b2d] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 574.41ms  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:10:12', '2015-04-17 14:10:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:12', '2015-04-17 14:10:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:12', '2015-04-17 14:10:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:12', '2015-04-17 14:10:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:12', '2015-04-17 14:10:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:10:12', '2015-04-17 14:10:12', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-17 14:10:12.836669"], ["updated_at", "2015-04-17 14:10:12.836669"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:10:12.841798"], ["id", 701625837]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-17 14:10:12.847100"], ["updated_at", "2015-04-17 14:10:12.847100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:10:12.849426"], ["updated_at", "2015-04-17 14:10:12.849426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:10:14', '2015-04-17 14:10:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 579229346) Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:14', '2015-04-17 14:10:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:14', '2015-04-17 14:10:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:14', '2015-04-17 14:10:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:14', '2015-04-17 14:10:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:10:14', '2015-04-17 14:10:14', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:10:14.026512"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.8ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:10:14.129345"], ["id", 335514824]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 595a7cf2-9ba5-46b4-b913-85c1e8cde43d) to Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [595a7cf2-9ba5-46b4-b913-85c1e8cde43d] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [595a7cf2-9ba5-46b4-b913-85c1e8cde43d] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 526.96ms Completed 500 Internal Server Error in 555ms (ActiveRecord: 1.4ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:10:15', '2015-04-17 14:10:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:15', '2015-04-17 14:10:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:15', '2015-04-17 14:10:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:15', '2015-04-17 14:10:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:15', '2015-04-17 14:10:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:10:15', '2015-04-17 14:10:15', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-17 14:10:15.185496"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-17 14:10:15.305777"], ["created_at", "2015-04-17 14:10:15.306186"], ["updated_at", "2015-04-17 14:10:15.306186"]]  (0.9ms) commit transaction  (0.3ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-17 14:10:15.311553"], ["created_at", "2015-04-17 14:10:15.311728"], ["updated_at", "2015-04-17 14:10:15.311728"]]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:10:15.588474"], ["id", 1039265257]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: d210374a-c45e-4e5d-8ac2-b05531baa87f) to Inline(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d210374a-c45e-4e5d-8ac2-b05531baa87f] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d210374a-c45e-4e5d-8ac2-b05531baa87f] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 532.98ms  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:10:17', '2015-04-17 14:10:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:17', '2015-04-17 14:10:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:17', '2015-04-17 14:10:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:17', '2015-04-17 14:10:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:17', '2015-04-17 14:10:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:10:17', '2015-04-17 14:10:17', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:10:17.637626"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 4d973aa1-7413-43fd-9fad-d9c4872e019f) to DelayedJob(default) at 2015-04-17 14:10:27 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:10:27.641200"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 4d973aa1-7413-43fd-9fad-d9c4872e019f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:10:17.657112"], ["updated_at", "2015-04-17 14:10:17.657112"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4d973aa1-7413-43fd-9fad-d9c4872e019f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 24.48ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d6260c6a-db17-46ce-bb66-1e695f483065] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d6260c6a-db17-46ce-bb66-1e695f483065]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d6260c6a-db17-46ce-bb66-1e695f483065] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-17 14:10:17.962701"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d6260c6a-db17-46ce-bb66-1e695f483065]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d6260c6a-db17-46ce-bb66-1e695f483065] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 5.99ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [79bef180-91f1-4566-aeac-7f6cebf2d1c6] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [79bef180-91f1-4566-aeac-7f6cebf2d1c6] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 0.28ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:10:18.559070"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7]  (4.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7) to DelayedJob(default) at 2015-04-17 14:10:28 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:10:28.567189"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:10:18.586390"], ["updated_at", "2015-04-17 14:10:18.586390"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5d0d7f7-0306-48bf-93ef-c7961ffcbcf7] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 32.88ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 620280917) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:10:18', '2015-04-17 14:10:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:18', '2015-04-17 14:10:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:18', '2015-04-17 14:10:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:18', '2015-04-17 14:10:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:10:18', '2015-04-17 14:10:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:10:18', '2015-04-17 14:10:18', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c41c9936f427ba5ad2ae03cb2f7f1161"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "c41c9936f427ba5ad2ae03cb2f7f1161"], ["created_at", "2015-04-17 14:10:18.800037"], ["updated_at", "2015-04-17 14:10:18.800037"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.1ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:10:18.837473"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:10:18.843644"], ["updated_at", "2015-04-17 14:10:18.843644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:10:18.852708"], ["updated_at", "2015-04-17 14:10:18.852708"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-17 14:10:18.853969"], ["updated_at", "2015-04-17 14:10:18.853969"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-17 14:10:18.855323"], ["updated_at", "2015-04-17 14:10:18.855323"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.3ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:15:24', '2015-04-17 14:15:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:24', '2015-04-17 14:15:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:24', '2015-04-17 14:15:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:24', '2015-04-17 14:15:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:24', '2015-04-17 14:15:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:15:24', '2015-04-17 14:15:24', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-17 14:15:24.964259"], ["updated_at", "2015-04-17 14:15:24.964259"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:15:24.968853"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-17 14:15:24.979546"], ["updated_at", "2015-04-17 14:15:24.979546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:15:24.981649"], ["updated_at", "2015-04-17 14:15:24.981649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "76eeffc71d6ee4c1ade60551f7dca7ba"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "76eeffc71d6ee4c1ade60551f7dca7ba"], ["created_at", "2015-04-17 14:15:24.984899"], ["updated_at", "2015-04-17 14:15:24.984899"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8d28d4853179ac4033145229095b4816"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8d28d4853179ac4033145229095b4816"], ["created_at", "2015-04-17 14:15:24.987640"], ["updated_at", "2015-04-17 14:15:24.987640"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c4d402edf7d15f6886b4e90ae7ad49d7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c4d402edf7d15f6886b4e90ae7ad49d7"], ["created_at", "2015-04-17 14:15:24.992432"], ["updated_at", "2015-04-17 14:15:24.992432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8f1eb53cb2f629fcc4c98a7a1311b9dd"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8f1eb53cb2f629fcc4c98a7a1311b9dd"], ["created_at", "2015-04-17 14:15:24.995166"], ["updated_at", "2015-04-17 14:15:24.995166"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "202e5df6e8d63af2c1474b358371683e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "202e5df6e8d63af2c1474b358371683e"], ["created_at", "2015-04-17 14:15:24.998942"], ["updated_at", "2015-04-17 14:15:24.998942"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:15:25.005549"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:15:25.101429"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 4f8ed4f1-7c7e-415b-aed8-82c0e54ced8d) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 4f8ed4f1-7c7e-415b-aed8-82c0e54ced8d\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-17 14:15:25.136467"], ["created_at", "2015-04-17 14:15:25.136724"], ["updated_at", "2015-04-17 14:15:25.136724"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 183950720) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:15:25', '2015-04-17 14:15:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:25', '2015-04-17 14:15:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:25', '2015-04-17 14:15:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:25', '2015-04-17 14:15:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:25', '2015-04-17 14:15:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:15:25', '2015-04-17 14:15:25', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 25ms (Views: 3.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4a5b179a0b5fe9625b42fa3be0d01da5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "4a5b179a0b5fe9625b42fa3be0d01da5"], ["created_at", "2015-04-17 14:15:25.342575"], ["updated_at", "2015-04-17 14:15:25.342575"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-17 14:15:25.348991"], ["updated_at", "2015-04-17 14:15:25.348991"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-17 14:15:25.383716"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68] SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:15:25.485768"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 302ebd75-b644-48e9-981d-ee959b4f2e68) to DelayedJob(default) at 2015-04-17 14:15:35 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68]  (0.3ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:15:35.491004"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 302ebd75-b644-48e9-981d-ee959b4f2e68\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:15:25.511908"], ["updated_at", "2015-04-17 14:15:25.511908"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [302ebd75-b644-48e9-981d-ee959b4f2e68] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 32.92ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.0ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38cd6e0b-de68-4fff-b6d6-6108356e71f5] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38cd6e0b-de68-4fff-b6d6-6108356e71f5]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38cd6e0b-de68-4fff-b6d6-6108356e71f5] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-17 14:15:25.748023"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38cd6e0b-de68-4fff-b6d6-6108356e71f5]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38cd6e0b-de68-4fff-b6d6-6108356e71f5] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 5.82ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4b03aaa5-de80-4186-b780-e8cde3e10b79] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4b03aaa5-de80-4186-b780-e8cde3e10b79] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 0.45ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:15:26.227966"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ef240111-9e6f-40ba-932a-701da512f9f7) to DelayedJob(default) at 2015-04-17 14:15:36 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:15:36.236434"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: ef240111-9e6f-40ba-932a-701da512f9f7\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:15:26.255547"], ["updated_at", "2015-04-17 14:15:26.255547"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ef240111-9e6f-40ba-932a-701da512f9f7] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 33.14ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:15:26', '2015-04-17 14:15:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:26', '2015-04-17 14:15:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:26', '2015-04-17 14:15:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:26', '2015-04-17 14:15:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:26', '2015-04-17 14:15:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:15:26', '2015-04-17 14:15:26', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.7ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:15:27', '2015-04-17 14:15:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:27', '2015-04-17 14:15:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:27', '2015-04-17 14:15:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:27', '2015-04-17 14:15:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:27', '2015-04-17 14:15:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:15:27', '2015-04-17 14:15:27', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:15:27.676022"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:15:27.792920"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 49273333-96fe-4906-a981-543d8643f00c) to Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [49273333-96fe-4906-a981-543d8643f00c] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [49273333-96fe-4906-a981-543d8643f00c] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 595.05ms Completed 500 Internal Server Error in 630ms (ActiveRecord: 1.9ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:15:28', '2015-04-17 14:15:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:28', '2015-04-17 14:15:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:28', '2015-04-17 14:15:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:28', '2015-04-17 14:15:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:28', '2015-04-17 14:15:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:15:28', '2015-04-17 14:15:28', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ff28f0ca5b8b6afa6404f0ae032e420d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "ff28f0ca5b8b6afa6404f0ae032e420d"], ["created_at", "2015-04-17 14:15:28.885747"], ["updated_at", "2015-04-17 14:15:28.885747"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-17 14:15:29.052947"], ["created_at", "2015-04-17 14:15:29.053302"], ["updated_at", "2015-04-17 14:15:29.053302"]]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-17 14:15:29.058429"], ["created_at", "2015-04-17 14:15:29.058601"], ["updated_at", "2015-04-17 14:15:29.058601"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:15:29.338439"], ["id", 1039265257]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: df886f35-bb57-4d76-bcfc-3fedb5309cc3) to Inline(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [df886f35-bb57-4d76-bcfc-3fedb5309cc3] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [df886f35-bb57-4d76-bcfc-3fedb5309cc3] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 523.17ms  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:15:31', '2015-04-17 14:15:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:31', '2015-04-17 14:15:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:31', '2015-04-17 14:15:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:31', '2015-04-17 14:15:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:15:31', '2015-04-17 14:15:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:15:31', '2015-04-17 14:15:31', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:15:31.428928"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:15:31.436368"], ["updated_at", "2015-04-17 14:15:31.436368"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:15:31.445438"], ["updated_at", "2015-04-17 14:15:31.445438"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-17 14:15:31.447018"], ["updated_at", "2015-04-17 14:15:31.447018"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-17 14:15:31.448301"], ["updated_at", "2015-04-17 14:15:31.448301"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:16:49', '2015-04-17 14:16:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bce56c0ac516ef9ed920b466cc4bb26c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "bce56c0ac516ef9ed920b466cc4bb26c"], ["created_at", "2015-04-17 14:16:49.524826"], ["updated_at", "2015-04-17 14:16:49.524826"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 1.7ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:16:49.600011"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:16:49.606662"], ["updated_at", "2015-04-17 14:16:49.606662"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:16:49.613391"], ["updated_at", "2015-04-17 14:16:49.613391"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-17 14:16:49.614824"], ["updated_at", "2015-04-17 14:16:49.614824"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-17 14:16:49.616105"], ["updated_at", "2015-04-17 14:16:49.616105"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:16:49.623625"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:16:49.732364"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 07a46e9b-4c7b-47c4-99c4-21859bbbfd81) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 07a46e9b-4c7b-47c4-99c4-21859bbbfd81\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-17 14:16:49.769739"], ["created_at", "2015-04-17 14:16:49.770033"], ["updated_at", "2015-04-17 14:16:49.770033"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 50ms (Views: 3.3ms | ActiveRecord: 3.5ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:16:49', '2015-04-17 14:16:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:49', '2015-04-17 14:16:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:16:49', '2015-04-17 14:16:49', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:16:51', '2015-04-17 14:16:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:51', '2015-04-17 14:16:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:51', '2015-04-17 14:16:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:51', '2015-04-17 14:16:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:51', '2015-04-17 14:16:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:16:51', '2015-04-17 14:16:51', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:16:51.377720"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 686a6ced-0408-4f67-844e-3e5347c46014) to DelayedJob(default) at 2015-04-17 14:17:01 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:17:01.381698"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 686a6ced-0408-4f67-844e-3e5347c46014\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:16:51.396731"], ["updated_at", "2015-04-17 14:16:51.396731"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [686a6ced-0408-4f67-844e-3e5347c46014] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 23.7ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [24c7c35c-95f3-45c9-bf7c-cb3d92d4c64a] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [24c7c35c-95f3-45c9-bf7c-cb3d92d4c64a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [24c7c35c-95f3-45c9-bf7c-cb3d92d4c64a] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-17 14:16:51.632616"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [24c7c35c-95f3-45c9-bf7c-cb3d92d4c64a]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [24c7c35c-95f3-45c9-bf7c-cb3d92d4c64a] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 5.77ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [2d68b700-f7bc-468b-a45d-0951b43afea4] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [2d68b700-f7bc-468b-a45d-0951b43afea4] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 0.41ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232] SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:16:52.095906"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232]  (4.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ae6333ba-c490-4935-aae8-87592feef232) to DelayedJob(default) at 2015-04-17 14:17:02 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:17:02.104327"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: ae6333ba-c490-4935-aae8-87592feef232\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:16:52.125452"], ["updated_at", "2015-04-17 14:16:52.125452"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ae6333ba-c490-4935-aae8-87592feef232] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 34.43ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:16:52', '2015-04-17 14:16:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:52', '2015-04-17 14:16:52', 419883833, 624739301, 701625837) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:52', '2015-04-17 14:16:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:52', '2015-04-17 14:16:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:52', '2015-04-17 14:16:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:16:52', '2015-04-17 14:16:52', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 14ms (Views: 3.8ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "33864507ac0d7bf5b403705e55373442"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "33864507ac0d7bf5b403705e55373442"], ["created_at", "2015-04-17 14:16:52.323816"], ["updated_at", "2015-04-17 14:16:52.323816"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-17 14:16:52.327289"], ["updated_at", "2015-04-17 14:16:52.327289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 4.2ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-17 14:16:52.485724"], ["created_at", "2015-04-17 14:16:52.486216"], ["updated_at", "2015-04-17 14:16:52.486216"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-17 14:16:52.492219"], ["created_at", "2015-04-17 14:16:52.492445"], ["updated_at", "2015-04-17 14:16:52.492445"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:16:52.765903"], ["id", 1039265257]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 4707c6e0-b0fd-4b5d-aea7-47cbbbd7f9da) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 4707c6e0-b0fd-4b5d-aea7-47cbbbd7f9da\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-04-17 14:16:52.797569"], ["created_at", "2015-04-17 14:16:52.797862"], ["updated_at", "2015-04-17 14:16:52.797862"]] [ActiveJob]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:16:53', '2015-04-17 14:16:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:53', '2015-04-17 14:16:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:53', '2015-04-17 14:16:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:53', '2015-04-17 14:16:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:53', '2015-04-17 14:16:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:16:53', '2015-04-17 14:16:53', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-17 14:16:53.904066"], ["updated_at", "2015-04-17 14:16:53.904066"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:16:53.909438"], ["id", 701625837]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-17 14:16:53.914271"], ["updated_at", "2015-04-17 14:16:53.914271"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:16:53.916953"], ["updated_at", "2015-04-17 14:16:53.916953"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3b92de47656d682c9daada4d9820de99"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3b92de47656d682c9daada4d9820de99"], ["created_at", "2015-04-17 14:16:53.921385"], ["updated_at", "2015-04-17 14:16:53.921385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6dd5a5e2dadd179001bc4c200b07fee7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6dd5a5e2dadd179001bc4c200b07fee7"], ["created_at", "2015-04-17 14:16:53.924984"], ["updated_at", "2015-04-17 14:16:53.924984"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6ed5a712e4d071f0b5f9707c4564251d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6ed5a712e4d071f0b5f9707c4564251d"], ["created_at", "2015-04-17 14:16:53.931546"], ["updated_at", "2015-04-17 14:16:53.931546"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d5c2d50cd7eeddc0253702534b728a29"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d5c2d50cd7eeddc0253702534b728a29"], ["created_at", "2015-04-17 14:16:53.934560"], ["updated_at", "2015-04-17 14:16:53.934560"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "aa46562c0650215c5cb36b7b9243e341"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "aa46562c0650215c5cb36b7b9243e341"], ["created_at", "2015-04-17 14:16:53.938684"], ["updated_at", "2015-04-17 14:16:53.938684"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:16:53.945889"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:16:54.046440"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 0bf47b99-266b-4dda-9a3b-668b5eb667f9) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 0bf47b99-266b-4dda-9a3b-668b5eb667f9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-17 14:16:54.086992"], ["created_at", "2015-04-17 14:16:54.087275"], ["updated_at", "2015-04-17 14:16:54.087275"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:16:54', '2015-04-17 14:16:54', 538821867) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:54', '2015-04-17 14:16:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:54', '2015-04-17 14:16:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:54', '2015-04-17 14:16:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:16:54', '2015-04-17 14:16:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:16:54', '2015-04-17 14:16:54', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-17 14:16:54.283692"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (1.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:49:48', '2015-04-17 14:49:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 49ms (Views: 3.5ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d7b3832190ab8a2e07e1f6be04beb32d"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "d7b3832190ab8a2e07e1f6be04beb32d"], ["created_at", "2015-04-17 14:49:48.441542"], ["updated_at", "2015-04-17 14:49:48.441542"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-17 14:49:48.452784"], ["updated_at", "2015-04-17 14:49:48.452784"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bc2b701f8e1da1aa4ece5a82f80ae64b"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bc2b701f8e1da1aa4ece5a82f80ae64b"], ["created_at", "2015-04-17 14:49:48.482915"], ["updated_at", "2015-04-17 14:49:48.482915"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9d33341c55b988edb431863591fc22ad"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9d33341c55b988edb431863591fc22ad"], ["created_at", "2015-04-17 14:49:48.485681"], ["updated_at", "2015-04-17 14:49:48.485681"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "00009ef7ad6911c3fd02b3b4edc8470b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "00009ef7ad6911c3fd02b3b4edc8470b"], ["created_at", "2015-04-17 14:49:48.490221"], ["updated_at", "2015-04-17 14:49:48.490221"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "673a88784bf054d18d4c2f0deebe44ea"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "673a88784bf054d18d4c2f0deebe44ea"], ["created_at", "2015-04-17 14:49:48.492735"], ["updated_at", "2015-04-17 14:49:48.492735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "69259e5156ab404e53771a83811633ca"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "69259e5156ab404e53771a83811633ca"], ["created_at", "2015-04-17 14:49:48.496194"], ["updated_at", "2015-04-17 14:49:48.496194"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:49:48.512430"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:49:48.629250"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 721ac478-80b0-49bf-937c-4301b6b9374c) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 721ac478-80b0-49bf-937c-4301b6b9374c\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-17 14:49:48.667424"], ["created_at", "2015-04-17 14:49:48.668353"], ["updated_at", "2015-04-17 14:49:48.668353"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:49:48', '2015-04-17 14:49:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:48', '2015-04-17 14:49:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:49:48', '2015-04-17 14:49:48', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:49:48.833962"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:49:48.840941"], ["updated_at", "2015-04-17 14:49:48.840941"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:49:48.847725"], ["updated_at", "2015-04-17 14:49:48.847725"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-17 14:49:48.849378"], ["updated_at", "2015-04-17 14:49:48.849378"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-17 14:49:48.850896"], ["updated_at", "2015-04-17 14:49:48.850896"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-17 14:49:48.874868"], ["updated_at", "2015-04-17 14:49:48.874868"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-17 14:49:48.879776"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-17 14:49:48.884098"], ["updated_at", "2015-04-17 14:49:48.884098"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-17 14:49:48.886358"], ["updated_at", "2015-04-17 14:49:48.886358"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-17 14:49:48.892328"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:49:48.992684"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 79ae92cd-84c4-4970-b65f-f3df0d635083) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 79ae92cd-84c4-4970-b65f-f3df0d635083\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-17 14:49:49.034852"], ["created_at", "2015-04-17 14:49:49.035233"], ["updated_at", "2015-04-17 14:49:49.035233"]] [ActiveJob]  (0.9ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 56ms (Views: 3.9ms | ActiveRecord: 3.4ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:49:49', '2015-04-17 14:49:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:49', '2015-04-17 14:49:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:49', '2015-04-17 14:49:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:49', '2015-04-17 14:49:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:49', '2015-04-17 14:49:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:49:49', '2015-04-17 14:49:49', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:49:49.283301"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: cfb91f03-88de-42b9-8aae-d0daf57f9a31) to DelayedJob(default) at 2015-04-17 14:49:59 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:49:59.288306"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: cfb91f03-88de-42b9-8aae-d0daf57f9a31\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:49:49.308878"], ["updated_at", "2015-04-17 14:49:49.308878"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [cfb91f03-88de-42b9-8aae-d0daf57f9a31] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 30.35ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f9a64b67-5f8a-4ee8-afc1-b6cf22942ee6] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f9a64b67-5f8a-4ee8-afc1-b6cf22942ee6]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f9a64b67-5f8a-4ee8-afc1-b6cf22942ee6] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-17 14:49:49.589917"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f9a64b67-5f8a-4ee8-afc1-b6cf22942ee6]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f9a64b67-5f8a-4ee8-afc1-b6cf22942ee6] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 7.91ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4171c20-693a-4330-b3e8-de7920a99fc8] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4171c20-693a-4330-b3e8-de7920a99fc8] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 0.42ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd] SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-17 14:49:50.069128"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd]  (4.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: eafe4685-5cc4-4c5c-8b00-ebffac5df5fd) to DelayedJob(default) at 2015-04-17 14:50:00 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-17 14:50:00.078603"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: eafe4685-5cc4-4c5c-8b00-ebffac5df5fd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-17 14:49:50.098456"], ["updated_at", "2015-04-17 14:49:50.098456"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [eafe4685-5cc4-4c5c-8b00-ebffac5df5fd] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 34.84ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:49:50', '2015-04-17 14:49:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:50', '2015-04-17 14:49:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:50', '2015-04-17 14:49:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:50', '2015-04-17 14:49:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:50', '2015-04-17 14:49:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:49:50', '2015-04-17 14:49:50', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1c2769dcfac2c70c86e5c4fe7058f329"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "1c2769dcfac2c70c86e5c4fe7058f329"], ["created_at", "2015-04-17 14:49:50.351918"], ["updated_at", "2015-04-17 14:49:50.351918"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (1.0ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 620280917) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-17 14:49:51', '2015-04-17 14:49:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:51', '2015-04-17 14:49:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:51', '2015-04-17 14:49:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:51', '2015-04-17 14:49:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-17 14:49:51', '2015-04-17 14:49:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-17 14:49:51', '2015-04-17 14:49:51', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-17 14:49:51.763889"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-17 14:49:51.882328"], ["created_at", "2015-04-17 14:49:51.882751"], ["updated_at", "2015-04-17 14:49:51.882751"]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-17 14:49:51.888344"], ["created_at", "2015-04-17 14:49:51.888577"], ["updated_at", "2015-04-17 14:49:51.888577"]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-17 14:49:52.165188"], ["id", 1039265257]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 51e4aeee-87a3-4677-a3a9-966ef7c1f272) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 51e4aeee-87a3-4677-a3a9-966ef7c1f272\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-04-17 14:49:52.198685"], ["created_at", "2015-04-17 14:49:52.199029"], ["updated_at", "2015-04-17 14:49:52.199029"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:49:27', '2015-04-20 06:49:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:27', '2015-04-20 06:49:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:27', '2015-04-20 06:49:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:27', '2015-04-20 06:49:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:27', '2015-04-20 06:49:27', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:49:27', '2015-04-20 06:49:27', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-20 06:49:27.510459"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 06:49:27.526586"], ["updated_at", "2015-04-20 06:49:27.526586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 06:49:27.533671"], ["updated_at", "2015-04-20 06:49:27.533671"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-20 06:49:27.535139"], ["updated_at", "2015-04-20 06:49:27.535139"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-20 06:49:27.536502"], ["updated_at", "2015-04-20 06:49:27.536502"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "012f2189df77fce2fdc5b4e5dac8fa94"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "012f2189df77fce2fdc5b4e5dac8fa94"], ["created_at", "2015-04-20 06:49:27.555052"], ["updated_at", "2015-04-20 06:49:27.555052"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.6ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-20 06:49:27.592646"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:49:28', '2015-04-20 06:49:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:28', '2015-04-20 06:49:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:28', '2015-04-20 06:49:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:28', '2015-04-20 06:49:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:28', '2015-04-20 06:49:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:49:28', '2015-04-20 06:49:28', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:49:29', '2015-04-20 06:49:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:29', '2015-04-20 06:49:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:29', '2015-04-20 06:49:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:29', '2015-04-20 06:49:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:29', '2015-04-20 06:49:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:49:29', '2015-04-20 06:49:29', 948421225)  (0.8ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-20 06:49:29.864071"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 3.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ca28acd65f068aa1b5f089b03cac436e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "ca28acd65f068aa1b5f089b03cac436e"], ["created_at", "2015-04-20 06:49:29.910390"], ["updated_at", "2015-04-20 06:49:29.910390"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-20 06:49:29.913525"], ["updated_at", "2015-04-20 06:49:29.913525"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.8ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-20 06:49:29.951515"], ["updated_at", "2015-04-20 06:49:29.951515"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-20 06:49:29.956547"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-20 06:49:29.960621"], ["updated_at", "2015-04-20 06:49:29.960621"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 06:49:29.963090"], ["updated_at", "2015-04-20 06:49:29.963090"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:49:31', '2015-04-20 06:49:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:31', '2015-04-20 06:49:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:31', '2015-04-20 06:49:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:31', '2015-04-20 06:49:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:31', '2015-04-20 06:49:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:49:31', '2015-04-20 06:49:31', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-20 06:49:32.003827"], ["id", 538821867]]  (0.6ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-20 06:49:42.007760"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-20 06:49:31'\n updated_at: &6 2015-04-20 06:49:32.003827000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-20 06:49:31'\n updated_at: '2015-04-20 06:49:31'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-20 06:49:31'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-20 06:49:31.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-20 06:49:32.031214"], ["updated_at", "2015-04-20 06:49:32.031214"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-20 06:49:32.321187"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-20 06:49:32.898579"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-20 06:49:42.901962"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-20 06:49:31'\n updated_at: &6 2015-04-20 06:49:32.898579000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-20 06:49:31'\n updated_at: '2015-04-20 06:49:32.321187'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-20 06:49:31'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-20 06:49:31.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-20 06:49:32.924380"], ["updated_at", "2015-04-20 06:49:32.924380"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:49:33', '2015-04-20 06:49:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "26c2c3a4cabee3cf151d3d878a86f747"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "26c2c3a4cabee3cf151d3d878a86f747"], ["created_at", "2015-04-20 06:49:33.127161"], ["updated_at", "2015-04-20 06:49:33.127161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "90e0491c0f765d6d7048fa22961b08e1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "90e0491c0f765d6d7048fa22961b08e1"], ["created_at", "2015-04-20 06:49:33.131893"], ["updated_at", "2015-04-20 06:49:33.131893"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ee58f6196872ea590934d0477f1690d6"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ee58f6196872ea590934d0477f1690d6"], ["created_at", "2015-04-20 06:49:33.138261"], ["updated_at", "2015-04-20 06:49:33.138261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7f73e597d7bc90317ba7cb92d2a9830e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7f73e597d7bc90317ba7cb92d2a9830e"], ["created_at", "2015-04-20 06:49:33.141991"], ["updated_at", "2015-04-20 06:49:33.141991"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5842cf2d232d6793088ff7933ab53aa2"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5842cf2d232d6793088ff7933ab53aa2"], ["created_at", "2015-04-20 06:49:33.146393"], ["updated_at", "2015-04-20 06:49:33.146393"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-20 06:49:33.155118"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:49:33', '2015-04-20 06:49:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:49:33', '2015-04-20 06:49:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:49:33', '2015-04-20 06:49:33', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:53:55', '2015-04-20 06:53:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:55', '2015-04-20 06:53:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:55', '2015-04-20 06:53:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:55', '2015-04-20 06:53:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:55', '2015-04-20 06:53:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:53:55', '2015-04-20 06:53:55', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-20 06:53:55.527975"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-20 06:54:05.532733"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-20 06:53:55'\n updated_at: &6 2015-04-20 06:53:55.527975000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-20 06:53:55'\n updated_at: '2015-04-20 06:53:55'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-20 06:53:55'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-20 06:53:55.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-20 06:53:55.552719"], ["updated_at", "2015-04-20 06:53:55.552719"]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-20 06:53:55.825548"], ["id", 538821867]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-20 06:53:56.343417"], ["id", 538821867]]  (4.9ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-20 06:54:06.352826"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-20 06:53:55'\n updated_at: &6 2015-04-20 06:53:56.343417000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-20 06:53:55'\n updated_at: '2015-04-20 06:53:55.825548'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-20 06:53:55'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-20 06:53:55.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-20 06:53:56.376180"], ["updated_at", "2015-04-20 06:53:56.376180"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:53:56', '2015-04-20 06:53:56', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:56', '2015-04-20 06:53:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:56', '2015-04-20 06:53:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:56', '2015-04-20 06:53:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:56', '2015-04-20 06:53:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:53:56', '2015-04-20 06:53:56', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-20 06:53:56.646229"], ["created_at", "2015-04-20 06:53:56.646634"], ["updated_at", "2015-04-20 06:53:56.646634"]]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-20 06:53:56.651536"], ["created_at", "2015-04-20 06:53:56.651702"], ["updated_at", "2015-04-20 06:53:56.651702"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-20 06:53:56.888998"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-20 06:53:56.911391"], ["created_at", "2015-04-20 06:53:56.911922"], ["updated_at", "2015-04-20 06:53:56.911922"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 335514824) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:53:58', '2015-04-20 06:53:58', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:58', '2015-04-20 06:53:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:58', '2015-04-20 06:53:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:58', '2015-04-20 06:53:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:58', '2015-04-20 06:53:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:53:58', '2015-04-20 06:53:58', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "062d77fd4dfb3b3da26f10fa29c7dd4a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "062d77fd4dfb3b3da26f10fa29c7dd4a"], ["created_at", "2015-04-20 06:53:58.024711"], ["updated_at", "2015-04-20 06:53:58.024711"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.6ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-20 06:53:58.074170"], ["updated_at", "2015-04-20 06:53:58.074170"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-20 06:53:58.079200"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-20 06:53:58.084077"], ["updated_at", "2015-04-20 06:53:58.084077"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 06:53:58.086325"], ["updated_at", "2015-04-20 06:53:58.086325"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-20 06:53:58.120742"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 1039265257) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:53:59', '2015-04-20 06:53:59', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 33ms (Views: 5.0ms | ActiveRecord: 0.6ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bc67e1906ab9f4c8c689dd8dcbb269ea"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "bc67e1906ab9f4c8c689dd8dcbb269ea"], ["created_at", "2015-04-20 06:53:59.448432"], ["updated_at", "2015-04-20 06:53:59.448432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-20 06:53:59.456384"], ["updated_at", "2015-04-20 06:53:59.456384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-20 06:53:59.515411"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 06:53:59.523384"], ["updated_at", "2015-04-20 06:53:59.523384"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 06:53:59.531637"], ["updated_at", "2015-04-20 06:53:59.531637"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-20 06:53:59.533219"], ["updated_at", "2015-04-20 06:53:59.533219"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-20 06:53:59.534656"], ["updated_at", "2015-04-20 06:53:59.534656"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-20 06:53:59.543806"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-20 06:53:59.679226"], ["id", 335514824]]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-20 06:53:59.710089"], ["created_at", "2015-04-20 06:53:59.710497"], ["updated_at", "2015-04-20 06:53:59.710497"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 45ms (Views: 3.4ms | ActiveRecord: 3.8ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 132093124) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 06:53:59', '2015-04-20 06:53:59', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 06:53:59', '2015-04-20 06:53:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 06:53:59', '2015-04-20 06:53:59', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b05e81e31055d6d156ee2adbd2ca174f"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b05e81e31055d6d156ee2adbd2ca174f"], ["created_at", "2015-04-20 06:53:59.936007"], ["updated_at", "2015-04-20 06:53:59.936007"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a79a97effc0e5e464a7cef52e2225f22"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a79a97effc0e5e464a7cef52e2225f22"], ["created_at", "2015-04-20 06:53:59.940933"], ["updated_at", "2015-04-20 06:53:59.940933"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1574ac9adc8ad2a581fe572893332160"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1574ac9adc8ad2a581fe572893332160"], ["created_at", "2015-04-20 06:53:59.947881"], ["updated_at", "2015-04-20 06:53:59.947881"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "572ee55f275ad5834c90478935057fa1"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "572ee55f275ad5834c90478935057fa1"], ["created_at", "2015-04-20 06:53:59.952742"], ["updated_at", "2015-04-20 06:53:59.952742"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "960eda9d2f513d74618f219f1979fb4b"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "960eda9d2f513d74618f219f1979fb4b"], ["created_at", "2015-04-20 06:53:59.959814"], ["updated_at", "2015-04-20 06:53:59.959814"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-20 06:53:59.972010"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-20 06:54:00.086464"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-20 06:54:00.106637"], ["created_at", "2015-04-20 06:54:00.106930"], ["updated_at", "2015-04-20 06:54:00.106930"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 14:57:00', '2015-04-20 14:57:00', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:00', '2015-04-20 14:57:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:00', '2015-04-20 14:57:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:00', '2015-04-20 14:57:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:00', '2015-04-20 14:57:00', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 14:57:00', '2015-04-20 14:57:00', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 6ms (ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (1.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "83b2c880f8c70c526a042e08a4cd0c1c"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "83b2c880f8c70c526a042e08a4cd0c1c"], ["created_at", "2015-04-20 14:57:00.546079"], ["updated_at", "2015-04-20 14:57:00.546079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.4ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 33ms (Views: 4.2ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f27a8afb66ff37e1e6a1643ed1f80503"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "f27a8afb66ff37e1e6a1643ed1f80503"], ["created_at", "2015-04-20 14:57:00.638891"], ["updated_at", "2015-04-20 14:57:00.638891"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-20 14:57:00.648660"], ["updated_at", "2015-04-20 14:57:00.648660"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-20 14:57:00.680286"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.4ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-20 14:57:00.819494"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (1.2ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-20 14:57:00.847224"], ["created_at", "2015-04-20 14:57:00.848179"], ["updated_at", "2015-04-20 14:57:00.848179"]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 43ms (Views: 4.0ms | ActiveRecord: 4.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 14:57:01', '2015-04-20 14:57:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-20 14:57:01.071838"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 14:57:01.078370"], ["updated_at", "2015-04-20 14:57:01.078370"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 14:57:01.088882"], ["updated_at", "2015-04-20 14:57:01.088882"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-20 14:57:01.090352"], ["updated_at", "2015-04-20 14:57:01.090352"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-20 14:57:01.091733"], ["updated_at", "2015-04-20 14:57:01.091733"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c2227d4be12681051de9cbd4a3565585"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c2227d4be12681051de9cbd4a3565585"], ["created_at", "2015-04-20 14:57:01.097457"], ["updated_at", "2015-04-20 14:57:01.097457"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "861057225a38d5f6d4cb1a7192182919"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "861057225a38d5f6d4cb1a7192182919"], ["created_at", "2015-04-20 14:57:01.101732"], ["updated_at", "2015-04-20 14:57:01.101732"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b54060b8c27fb5b5ea81dda73c870fd1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b54060b8c27fb5b5ea81dda73c870fd1"], ["created_at", "2015-04-20 14:57:01.108897"], ["updated_at", "2015-04-20 14:57:01.108897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "54bfcdb98dfa88708430c62812173839"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "54bfcdb98dfa88708430c62812173839"], ["created_at", "2015-04-20 14:57:01.112107"], ["updated_at", "2015-04-20 14:57:01.112107"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "adc8e33e0113596389379f3f02220c21"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "adc8e33e0113596389379f3f02220c21"], ["created_at", "2015-04-20 14:57:01.117374"], ["updated_at", "2015-04-20 14:57:01.117374"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-20 14:57:01.124955"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-20 14:57:01.232962"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-20 14:57:01.253803"], ["created_at", "2015-04-20 14:57:01.254107"], ["updated_at", "2015-04-20 14:57:01.254107"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 183950720) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 14:57:01', '2015-04-20 14:57:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:01', '2015-04-20 14:57:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 14:57:01', '2015-04-20 14:57:01', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-20 14:57:01.486432"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction --------------------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_wrong_size --------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 819504217) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 14:57:02', '2015-04-20 14:57:02', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:02', '2015-04-20 14:57:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:02', '2015-04-20 14:57:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:02', '2015-04-20 14:57:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:02', '2015-04-20 14:57:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 14:57:02', '2015-04-20 14:57:02', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-20 14:57:02.964023"], ["updated_at", "2015-04-20 14:57:02.964023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-20 14:57:02.968820"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-20 14:57:02.975639"], ["updated_at", "2015-04-20 14:57:02.975639"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-20 14:57:02.978405"], ["updated_at", "2015-04-20 14:57:02.978405"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 50x50\nkey: png3-thumbnail-0.png\n"], ["run_at", "2015-04-20 14:57:03.083979"], ["created_at", "2015-04-20 14:57:03.084503"], ["updated_at", "2015-04-20 14:57:03.084503"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\nsize: 60x60\nkey: png3-thumbnail-1.png\n"], ["run_at", "2015-04-20 14:57:03.090669"], ["created_at", "2015-04-20 14:57:03.091252"], ["updated_at", "2015-04-20 14:57:03.091252"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-20 14:57:03.364633"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-20 14:57:03.386543"], ["created_at", "2015-04-20 14:57:03.386825"], ["updated_at", "2015-04-20 14:57:03.386825"]]  (0.7ms) commit transaction  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-20 14:57:04', '2015-04-20 14:57:04', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:04', '2015-04-20 14:57:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:04', '2015-04-20 14:57:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:04', '2015-04-20 14:57:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-20 14:57:04', '2015-04-20 14:57:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-20 14:57:04', '2015-04-20 14:57:04', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (1.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-20 14:57:04.729797"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-20 14:57:14.733673"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-20 14:57:04'\n updated_at: &6 2015-04-20 14:57:04.729797000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-20 14:57:04'\n updated_at: '2015-04-20 14:57:04'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-20 14:57:04'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-20 14:57:04.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-20 14:57:04.766067"], ["updated_at", "2015-04-20 14:57:04.766067"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-20 14:57:05.041508"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-20 14:57:05.618482"], ["id", 538821867]]  (5.5ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-20 14:57:15.626749"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-20 14:57:04'\n updated_at: &6 2015-04-20 14:57:05.618482000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-20 14:57:04'\n updated_at: '2015-04-20 14:57:05.041508'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-20 14:57:04'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-20 14:57:04.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-20 14:57:05.659809"], ["updated_at", "2015-04-20 14:57:05.659809"]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:24:44', '2015-04-21 06:24:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 153115190) Fixture Delete (0.7ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:24:44', '2015-04-21 06:24:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:24:44', '2015-04-21 06:24:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:24:44', '2015-04-21 06:24:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:24:44', '2015-04-21 06:24:44', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:24:44', '2015-04-21 06:24:44', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (1.0ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 06:24:44.226457"], ["created_at", "2015-04-21 06:24:44.226960"], ["updated_at", "2015-04-21 06:24:44.226960"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:24:44.741548"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-21 06:24:44.799194"], ["created_at", "2015-04-21 06:24:44.799595"], ["updated_at", "2015-04-21 06:24:44.799595"]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:25:20', '2015-04-21 06:25:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:25:20', '2015-04-21 06:25:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:25:20', '2015-04-21 06:25:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:25:20', '2015-04-21 06:25:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:25:20', '2015-04-21 06:25:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:25:20', '2015-04-21 06:25:20', 948421225)  (4.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 06:25:20.636473"], ["created_at", "2015-04-21 06:25:20.637199"], ["updated_at", "2015-04-21 06:25:20.637199"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:25:20.897911"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-21 06:25:20.917910"], ["created_at", "2015-04-21 06:25:20.918257"], ["updated_at", "2015-04-21 06:25:20.918257"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:28:12', '2015-04-21 06:28:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:28:12', '2015-04-21 06:28:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:28:12', '2015-04-21 06:28:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:28:12', '2015-04-21 06:28:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:28:12', '2015-04-21 06:28:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:28:12', '2015-04-21 06:28:12', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 06:28:12.452798"], ["created_at", "2015-04-21 06:28:12.453268"], ["updated_at", "2015-04-21 06:28:12.453268"]]  (0.7ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 06:28:12.457275"], ["id", 14225656]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:28:12.764219"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-21 06:28:12.827288"], ["created_at", "2015-04-21 06:28:12.827652"], ["updated_at", "2015-04-21 06:28:12.827652"]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.3ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:42:19', '2015-04-21 06:42:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:19', '2015-04-21 06:42:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:19', '2015-04-21 06:42:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:19', '2015-04-21 06:42:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:19', '2015-04-21 06:42:19', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:42:19', '2015-04-21 06:42:19', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:42:30', '2015-04-21 06:42:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:30', '2015-04-21 06:42:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:30', '2015-04-21 06:42:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:30', '2015-04-21 06:42:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:42:30', '2015-04-21 06:42:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:42:30', '2015-04-21 06:42:30', 948421225)  (4.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:43:07', '2015-04-21 06:43:07', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:07', '2015-04-21 06:43:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:07', '2015-04-21 06:43:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:07', '2015-04-21 06:43:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:07', '2015-04-21 06:43:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:43:07', '2015-04-21 06:43:07', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:43:56', '2015-04-21 06:43:56', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:43:56', '2015-04-21 06:43:56', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:56', '2015-04-21 06:43:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:56', '2015-04-21 06:43:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:56', '2015-04-21 06:43:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:43:56', '2015-04-21 06:43:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:43:56', '2015-04-21 06:43:56', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:43:57.402839"], ["id", 731805050]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:44:16', '2015-04-21 06:44:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:44:16', '2015-04-21 06:44:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:44:16', '2015-04-21 06:44:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:44:16', '2015-04-21 06:44:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:44:16', '2015-04-21 06:44:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:44:16', '2015-04-21 06:44:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:44:16', '2015-04-21 06:44:16', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:44:17.512946"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:44:17.760769"], ["id", 731805050]]  (0.6ms) commit transaction  (0.0ms) begin transaction  (0.2ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:45:01', '2015-04-21 06:45:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:45:01', '2015-04-21 06:45:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:01', '2015-04-21 06:45:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:01', '2015-04-21 06:45:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:01', '2015-04-21 06:45:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:01', '2015-04-21 06:45:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:45:01', '2015-04-21 06:45:01', 948421225)  (4.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:45:02.259284"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:45:02.490338"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:45:19', '2015-04-21 06:45:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:45:19', '2015-04-21 06:45:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:19', '2015-04-21 06:45:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:19', '2015-04-21 06:45:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:19', '2015-04-21 06:45:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:19', '2015-04-21 06:45:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:45:19', '2015-04-21 06:45:19', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:45:19.961075"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:45:20.282174"], ["id", 731805050]]  (0.6ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:45:34', '2015-04-21 06:45:34', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:45:34', '2015-04-21 06:45:34', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:34', '2015-04-21 06:45:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:34', '2015-04-21 06:45:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:34', '2015-04-21 06:45:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:34', '2015-04-21 06:45:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:45:34', '2015-04-21 06:45:34', 948421225)  (4.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:45:34.478453"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:45:34.713270"], ["id", 731805050]]  (0.6ms) commit transaction  (0.0ms) begin transaction  (0.1ms) commit transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:45:39', '2015-04-21 06:45:39', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:45:39', '2015-04-21 06:45:39', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:39', '2015-04-21 06:45:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:39', '2015-04-21 06:45:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:39', '2015-04-21 06:45:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:45:39', '2015-04-21 06:45:39', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:45:39', '2015-04-21 06:45:39', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:45:40.397573"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:45:40.624111"], ["id", 731805050]]  (0.6ms) commit transaction  (0.0ms) begin transaction  (0.3ms) commit transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:47:10', '2015-04-21 06:47:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:47:10', '2015-04-21 06:47:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:47:10', '2015-04-21 06:47:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:47:10', '2015-04-21 06:47:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:47:10', '2015-04-21 06:47:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:47:10', '2015-04-21 06:47:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:47:10', '2015-04-21 06:47:10', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:47:12.033322"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:47:12.274968"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:53:09', '2015-04-21 06:53:09', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:53:09', '2015-04-21 06:53:09', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:09', '2015-04-21 06:53:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:09', '2015-04-21 06:53:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:09', '2015-04-21 06:53:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:09', '2015-04-21 06:53:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:53:09', '2015-04-21 06:53:09', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 45ms (Views: 3.5ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c3f0b6fc21ae1d648d2823c6bb77e0aa"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "c3f0b6fc21ae1d648d2823c6bb77e0aa"], ["created_at", "2015-04-21 06:53:09.872626"], ["updated_at", "2015-04-21 06:53:09.872626"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-21 06:53:09.881916"], ["updated_at", "2015-04-21 06:53:09.881916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (1.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fd46f6c1bdf1e5e08ae9f821b70ef517"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fd46f6c1bdf1e5e08ae9f821b70ef517"], ["created_at", "2015-04-21 06:53:09.912559"], ["updated_at", "2015-04-21 06:53:09.912559"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6adcd8a52f3b4dc8b5fcdabac13ce441"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6adcd8a52f3b4dc8b5fcdabac13ce441"], ["created_at", "2015-04-21 06:53:09.916593"], ["updated_at", "2015-04-21 06:53:09.916593"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8acfc1543426d7bba2a714aeebe7b141"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8acfc1543426d7bba2a714aeebe7b141"], ["created_at", "2015-04-21 06:53:09.923053"], ["updated_at", "2015-04-21 06:53:09.923053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dabb545f5d256aa3f5580a25dad27bfa"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dabb545f5d256aa3f5580a25dad27bfa"], ["created_at", "2015-04-21 06:53:09.926595"], ["updated_at", "2015-04-21 06:53:09.926595"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "438eff781461b86fa73db536de2df080"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "438eff781461b86fa73db536de2df080"], ["created_at", "2015-04-21 06:53:09.930438"], ["updated_at", "2015-04-21 06:53:09.930438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 06:53:09.944028"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:53:10.059114"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-21 06:53:10.085808"], ["created_at", "2015-04-21 06:53:10.086202"], ["updated_at", "2015-04-21 06:53:10.086202"]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:53:10', '2015-04-21 06:53:10', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:53:10', '2015-04-21 06:53:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:10', '2015-04-21 06:53:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:10', '2015-04-21 06:53:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:10', '2015-04-21 06:53:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:10', '2015-04-21 06:53:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:53:10', '2015-04-21 06:53:10', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-21 06:53:10.251156"], ["updated_at", "2015-04-21 06:53:10.251156"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 06:53:10.256565"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-21 06:53:10.262873"], ["updated_at", "2015-04-21 06:53:10.262873"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:53:10.265648"], ["updated_at", "2015-04-21 06:53:10.265648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 06:53:10.275101"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:53:10.280385"], ["updated_at", "2015-04-21 06:53:10.280385"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:53:10.286161"], ["updated_at", "2015-04-21 06:53:10.286161"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-21 06:53:10.287265"], ["updated_at", "2015-04-21 06:53:10.287265"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-21 06:53:10.288651"], ["updated_at", "2015-04-21 06:53:10.288651"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3af7223102eb324bfc567e7629508c5f"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "3af7223102eb324bfc567e7629508c5f"], ["created_at", "2015-04-21 06:53:10.298428"], ["updated_at", "2015-04-21 06:53:10.298428"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-21 06:53:10.342342"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (2.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:53:10.988852"], ["id", 731805050]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:53:11.192948"], ["id", 731805050]]  (0.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:53:11', '2015-04-21 06:53:11', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:53:11', '2015-04-21 06:53:11', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:11', '2015-04-21 06:53:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:11', '2015-04-21 06:53:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:11', '2015-04-21 06:53:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:11', '2015-04-21 06:53:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:53:11', '2015-04-21 06:53:11', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 06:53:11.560161"], ["id", 538821867]]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-21 06:53:21.565111"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-21 06:53:11'\n updated_at: &6 2015-04-21 06:53:11.560161000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-21 06:53:11'\n updated_at: '2015-04-21 06:53:11'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-21 06:53:11'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-21 06:53:11.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-21 06:53:11.590052"], ["updated_at", "2015-04-21 06:53:11.590052"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-21 06:53:11.867229"], ["id", 538821867]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 06:53:12.456141"], ["id", 538821867]]  (4.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["run_at", "2015-04-21 06:53:22.464044"], ["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 538821867\nresource: !ruby/object:Fogged::Resource\n raw_attributes:\n encoding_job_id: '1234567890'\n id: 538821867\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: 800\n height: 600\n uploading: f\n duration: 15\n created_at: '2015-04-21 06:53:11'\n updated_at: &6 2015-04-21 06:53:12.456141000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: 800\n height: 600\n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 100\n encoding_job_id: '1234567890'\n duration: 15\n created_at: '2015-04-21 06:53:11'\n updated_at: '2015-04-21 06:53:11.867229'\n additional_types: {}\n materialized: true\n delegate_hash:\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: 800\n type: *2\n value: 800\n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: 600\n type: *2\n value: 600\n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: 15\n type: *2\n value: 15\n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-21 06:53:11'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-21 06:53:11.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\n"], ["created_at", "2015-04-21 06:53:12.491941"], ["updated_at", "2015-04-21 06:53:12.491941"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:53:12', '2015-04-21 06:53:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:53:12', '2015-04-21 06:53:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:12', '2015-04-21 06:53:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:12', '2015-04-21 06:53:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:12', '2015-04-21 06:53:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:12', '2015-04-21 06:53:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:53:12', '2015-04-21 06:53:12', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 06:53:12.729800"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:53:12.845712"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 335514824\n"], ["run_at", "2015-04-21 06:53:12.864410"], ["created_at", "2015-04-21 06:53:12.864699"], ["updated_at", "2015-04-21 06:53:12.864699"]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 31ms (Views: 4.4ms | ActiveRecord: 2.9ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:53:13', '2015-04-21 06:53:13', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:53:13', '2015-04-21 06:53:13', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:13', '2015-04-21 06:53:13', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:13', '2015-04-21 06:53:13', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:13', '2015-04-21 06:53:13', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:53:13', '2015-04-21 06:53:13', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:53:13', '2015-04-21 06:53:13', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 06:53:13.198377"], ["created_at", "2015-04-21 06:53:13.198866"], ["updated_at", "2015-04-21 06:53:13.198866"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 06:53:13.202963"], ["id", 14225656]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:53:13.491349"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::ZencoderPollJob\nresource_id: 1039265257\n"], ["run_at", "2015-04-21 06:53:13.514040"], ["created_at", "2015-04-21 06:53:13.514333"], ["updated_at", "2015-04-21 06:53:13.514333"]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:56:51', '2015-04-21 06:56:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:56:51', '2015-04-21 06:56:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:51', '2015-04-21 06:56:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:51', '2015-04-21 06:56:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:51', '2015-04-21 06:56:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:51', '2015-04-21 06:56:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:56:51', '2015-04-21 06:56:51', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-21 06:56:51.696596"], ["updated_at", "2015-04-21 06:56:51.696596"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 06:56:51.701639"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-21 06:56:51.712976"], ["updated_at", "2015-04-21 06:56:51.712976"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:56:51.715338"], ["updated_at", "2015-04-21 06:56:51.715338"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.1ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:56:53', '2015-04-21 06:56:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:56:53', '2015-04-21 06:56:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:53', '2015-04-21 06:56:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:53', '2015-04-21 06:56:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:53', '2015-04-21 06:56:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:53', '2015-04-21 06:56:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:56:53', '2015-04-21 06:56:53', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:56:54.403347"], ["id", 731805050]]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:56:54.634772"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:56:54', '2015-04-21 06:56:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:56:54', '2015-04-21 06:56:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:54', '2015-04-21 06:56:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:54', '2015-04-21 06:56:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:54', '2015-04-21 06:56:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:54', '2015-04-21 06:56:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:56:54', '2015-04-21 06:56:54', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 06:56:54.845725"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 2.1ms | ActiveRecord: 1.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:56:54.971728"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 3f183691-ea89-46e5-b5fb-2fc9a2cf695e) to Inline(default) with arguments: 335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [3f183691-ea89-46e5-b5fb-2fc9a2cf695e] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: 335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [3f183691-ea89-46e5-b5fb-2fc9a2cf695e] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.36ms Completed 500 Internal Server Error in 26ms (ActiveRecord: 1.6ms)  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:56:55', '2015-04-21 06:56:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:56:55', '2015-04-21 06:56:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:55', '2015-04-21 06:56:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:55', '2015-04-21 06:56:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:55', '2015-04-21 06:56:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:55', '2015-04-21 06:56:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:56:55', '2015-04-21 06:56:55', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 36ms (Views: 4.9ms | ActiveRecord: 0.7ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 3.2ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5accbba1c36004fe5a91382e583570c0"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "5accbba1c36004fe5a91382e583570c0"], ["created_at", "2015-04-21 06:56:55.601774"], ["updated_at", "2015-04-21 06:56:55.601774"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-21 06:56:55.613389"], ["updated_at", "2015-04-21 06:56:55.613389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 0.4ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 5.4ms | ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-21 06:56:55.678815"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 06:56:55.791191"], ["created_at", "2015-04-21 06:56:55.791641"], ["updated_at", "2015-04-21 06:56:55.791641"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 06:56:55.795852"], ["id", 14225656]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:56:56.094279"], ["id", 1039265257]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 4122daff-eade-4c90-8ec6-073cbf9ce7df) to Inline(default) with arguments: 1039265257 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4122daff-eade-4c90-8ec6-073cbf9ce7df] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: 1039265257 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4122daff-eade-4c90-8ec6-073cbf9ce7df] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.35ms  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 819504217) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:56:57', '2015-04-21 06:56:57', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:56:57', '2015-04-21 06:56:57', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:57', '2015-04-21 06:56:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:57', '2015-04-21 06:56:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:57', '2015-04-21 06:56:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:57', '2015-04-21 06:56:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:56:57', '2015-04-21 06:56:57', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "12ea48d5e5014c9d83314d4da77b8751"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "12ea48d5e5014c9d83314d4da77b8751"], ["created_at", "2015-04-21 06:56:57.859015"], ["updated_at", "2015-04-21 06:56:57.859015"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b3b77498038afcabe008ca5660cd1aaf"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b3b77498038afcabe008ca5660cd1aaf"], ["created_at", "2015-04-21 06:56:57.862836"], ["updated_at", "2015-04-21 06:56:57.862836"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "25b3233445de331bb38852b14e32a38f"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "25b3233445de331bb38852b14e32a38f"], ["created_at", "2015-04-21 06:56:57.870338"], ["updated_at", "2015-04-21 06:56:57.870338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5dc7aa575e2babae1aedb12da8a5b100"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5dc7aa575e2babae1aedb12da8a5b100"], ["created_at", "2015-04-21 06:56:57.874346"], ["updated_at", "2015-04-21 06:56:57.874346"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "de6667005bc5146982f4ecf7b18e5c2d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "de6667005bc5146982f4ecf7b18e5c2d"], ["created_at", "2015-04-21 06:56:57.879352"], ["updated_at", "2015-04-21 06:56:57.879352"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 06:56:57.888145"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:56:57.982251"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a4cfee8e-d06d-4739-9bbe-577860568fe2) to Inline(default) with arguments: 335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a4cfee8e-d06d-4739-9bbe-577860568fe2] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: 335514824 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a4cfee8e-d06d-4739-9bbe-577860568fe2] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.24ms  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:56:58', '2015-04-21 06:56:58', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:56:58', '2015-04-21 06:56:58', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:58', '2015-04-21 06:56:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:58', '2015-04-21 06:56:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:58', '2015-04-21 06:56:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:56:58', '2015-04-21 06:56:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:56:58', '2015-04-21 06:56:58', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 06:56:58.498132"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:56:58.506456"], ["updated_at", "2015-04-21 06:56:58.506456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:56:58.513282"], ["updated_at", "2015-04-21 06:56:58.513282"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-21 06:56:58.514696"], ["updated_at", "2015-04-21 06:56:58.514696"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-21 06:56:58.516076"], ["updated_at", "2015-04-21 06:56:58.516076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "804164091a7a1df6b695feb843603c1a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "804164091a7a1df6b695feb843603c1a"], ["created_at", "2015-04-21 06:56:58.527475"], ["updated_at", "2015-04-21 06:56:58.527475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.6ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:58:02', '2015-04-21 06:58:02', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:58:02', '2015-04-21 06:58:02', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-21 06:58:02.281882"], ["updated_at", "2015-04-21 06:58:02.281882"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 06:58:02.291952"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-21 06:58:02.306216"], ["updated_at", "2015-04-21 06:58:02.306216"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:58:02.309585"], ["updated_at", "2015-04-21 06:58:02.309585"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 06:58:02.345637"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:58:02.352078"], ["updated_at", "2015-04-21 06:58:02.352078"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 06:58:02.360714"], ["updated_at", "2015-04-21 06:58:02.360714"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-21 06:58:02.362362"], ["updated_at", "2015-04-21 06:58:02.362362"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-21 06:58:02.364189"], ["updated_at", "2015-04-21 06:58:02.364189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 06:58:02.375579"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:58:02.483004"], ["id", 335514824]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: e1ef92fd-11b3-479f-82ef-aa4e27c30ab7) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: e1ef92fd-11b3-479f-82ef-aa4e27c30ab7\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 06:58:02.521953"], ["created_at", "2015-04-21 06:58:02.522322"], ["updated_at", "2015-04-21 06:58:02.522322"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 51ms (Views: 3.3ms | ActiveRecord: 3.3ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 1039265257) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:58:02', '2015-04-21 06:58:02', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:58:02', '2015-04-21 06:58:02', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:02', '2015-04-21 06:58:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:58:02', '2015-04-21 06:58:02', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 4.6ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a1253131cd71034ce100ce503d835e48"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "a1253131cd71034ce100ce503d835e48"], ["created_at", "2015-04-21 06:58:02.722784"], ["updated_at", "2015-04-21 06:58:02.722784"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-21 06:58:02.726072"], ["updated_at", "2015-04-21 06:58:02.726072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-21 06:58:02.801192"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11324bd0-57d8-41c6-b439-7fc3992e99a2] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11324bd0-57d8-41c6-b439-7fc3992e99a2] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.25ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d312966-5fe2-4d19-a4c3-4e2c0831a1f3] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d312966-5fe2-4d19-a4c3-4e2c0831a1f3] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.59ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b830dd2d-65cb-4eba-a8d0-18f1885d1c74] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b830dd2d-65cb-4eba-a8d0-18f1885d1c74] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.36ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4c1d50fb-31bb-4c56-b5b3-cbb114a01fa6] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [4c1d50fb-31bb-4c56-b5b3-cbb114a01fa6] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.13ms  (0.5ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:58:05', '2015-04-21 06:58:05', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:58:05', '2015-04-21 06:58:05', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:05', '2015-04-21 06:58:05', 419883833, 624739301, 701625837) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:05', '2015-04-21 06:58:05', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:05', '2015-04-21 06:58:05', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:05', '2015-04-21 06:58:05', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:58:05', '2015-04-21 06:58:05', 948421225)  (7.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.8ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 06:58:05.987000"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 06:58:06.212488"], ["id", 731805050]]  (0.6ms) commit transaction  (0.3ms) begin transaction  (0.0ms) commit transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:58:06', '2015-04-21 06:58:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:58:06', '2015-04-21 06:58:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:06', '2015-04-21 06:58:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:06', '2015-04-21 06:58:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:06', '2015-04-21 06:58:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:06', '2015-04-21 06:58:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:58:06', '2015-04-21 06:58:06', 948421225)  (0.7ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fc2990b31e58a227fc113357e2e7b0d0"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "fc2990b31e58a227fc113357e2e7b0d0"], ["created_at", "2015-04-21 06:58:06.491880"], ["updated_at", "2015-04-21 06:58:06.491880"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 06:58:06.666364"], ["created_at", "2015-04-21 06:58:06.666790"], ["updated_at", "2015-04-21 06:58:06.666790"]]  (0.6ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 06:58:06.670962"], ["id", 14225656]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:58:07.038224"], ["id", 1039265257]]  (4.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 31d2dec3-12c3-4d9f-b7c9-f722b4102805) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.8ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 31d2dec3-12c3-4d9f-b7c9-f722b4102805\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-04-21 06:58:07.087189"], ["created_at", "2015-04-21 06:58:07.087505"], ["updated_at", "2015-04-21 06:58:07.087505"]] [ActiveJob]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:58:08', '2015-04-21 06:58:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:58:08', '2015-04-21 06:58:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 579229346) Fixture Insert (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:08', '2015-04-21 06:58:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:08', '2015-04-21 06:58:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:08', '2015-04-21 06:58:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:58:08', '2015-04-21 06:58:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:58:08', '2015-04-21 06:58:08', 948421225)  (4.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4be284607bf2083c7231584bd1ad60e1"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4be284607bf2083c7231584bd1ad60e1"], ["created_at", "2015-04-21 06:58:08.536679"], ["updated_at", "2015-04-21 06:58:08.536679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a83101c32830e1a6d3db3a4a8d382129"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a83101c32830e1a6d3db3a4a8d382129"], ["created_at", "2015-04-21 06:58:08.540374"], ["updated_at", "2015-04-21 06:58:08.540374"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1534d7167ed29ec393aa1e7cb32c7ad7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1534d7167ed29ec393aa1e7cb32c7ad7"], ["created_at", "2015-04-21 06:58:08.546486"], ["updated_at", "2015-04-21 06:58:08.546486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "24215500debc9443d6abb76de84eacf5"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "24215500debc9443d6abb76de84eacf5"], ["created_at", "2015-04-21 06:58:08.549677"], ["updated_at", "2015-04-21 06:58:08.549677"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2e2326cdc64ce1ee61d037bbfc232f77"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2e2326cdc64ce1ee61d037bbfc232f77"], ["created_at", "2015-04-21 06:58:08.553829"], ["updated_at", "2015-04-21 06:58:08.553829"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 06:58:08.562116"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 06:58:08.675674"], ["id", 335514824]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: e2a336b2-fb6c-47db-bf28-305269388e68) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (1.2ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: e2a336b2-fb6c-47db-bf28-305269388e68\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 06:58:08.713588"], ["created_at", "2015-04-21 06:58:08.713919"], ["updated_at", "2015-04-21 06:58:08.713919"]] [ActiveJob]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 06:59:07', '2015-04-21 06:59:07', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 06:59:07', '2015-04-21 06:59:07', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:59:07', '2015-04-21 06:59:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:59:07', '2015-04-21 06:59:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:59:07', '2015-04-21 06:59:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 06:59:07', '2015-04-21 06:59:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 06:59:07', '2015-04-21 06:59:07', 948421225)  (4.8ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5362f317-ce3b-4923-9919-dc902e67d10c] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5362f317-ce3b-4923-9919-dc902e67d10c] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.21ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [332031c6-7dde-4b64-9f80-e619e0a36717] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [332031c6-7dde-4b64-9f80-e619e0a36717] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.38ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [56499900-4aa8-4276-b0e5-fa2131c0f765] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [56499900-4aa8-4276-b0e5-fa2131c0f765] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.41ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b51a8038-3c56-469b-a59b-c8087d422fbe] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b51a8038-3c56-469b-a59b-c8087d422fbe] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.22ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:00:15', '2015-04-21 07:00:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:00:15', '2015-04-21 07:00:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:15', '2015-04-21 07:00:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:15', '2015-04-21 07:00:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:15', '2015-04-21 07:00:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:15', '2015-04-21 07:00:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:00:15', '2015-04-21 07:00:15', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:00:15.179167"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: f44b3a2d-8632-4261-bbbe-085d0bb13086) to Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.29ms [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f44b3a2d-8632-4261-bbbe-085d0bb13086] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 72.53ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [caa19655-d360-4f88-9700-3c1401a699b5] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [caa19655-d360-4f88-9700-3c1401a699b5]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [caa19655-d360-4f88-9700-3c1401a699b5] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-21 07:00:15.709206"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [caa19655-d360-4f88-9700-3c1401a699b5]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [caa19655-d360-4f88-9700-3c1401a699b5] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 51.56ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [74cdd579-49ed-4137-aca2-bba706713c6b] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [74cdd579-49ed-4137-aca2-bba706713c6b] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.4ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:00:16.257821"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 9cb778c9-3235-4ffc-9051-3fdde32b4050) to Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.25ms [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9cb778c9-3235-4ffc-9051-3fdde32b4050] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 86.22ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:00:51', '2015-04-21 07:00:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:00:51', '2015-04-21 07:00:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:51', '2015-04-21 07:00:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:51', '2015-04-21 07:00:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:51', '2015-04-21 07:00:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:00:51', '2015-04-21 07:00:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:00:51', '2015-04-21 07:00:51', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:00:51.588533"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: b01b9459-a5f3-48bf-a818-822f0ce2e2d1) to Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1.15ms [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b01b9459-a5f3-48bf-a818-822f0ce2e2d1] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 72.9ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:02:31', '2015-04-21 07:02:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:02:31', '2015-04-21 07:02:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:31', '2015-04-21 07:02:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:31', '2015-04-21 07:02:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:31', '2015-04-21 07:02:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:31', '2015-04-21 07:02:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:02:31', '2015-04-21 07:02:31', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:02:33.503143"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: e6fc4b31-6638-4065-9dca-6b32eaeaa5db) to Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 1200.07ms [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6fc4b31-6638-4065-9dca-6b32eaeaa5db] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 3608.31ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:02:48', '2015-04-21 07:02:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:02:48', '2015-04-21 07:02:48', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:48', '2015-04-21 07:02:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:48', '2015-04-21 07:02:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:48', '2015-04-21 07:02:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:02:48', '2015-04-21 07:02:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:02:48', '2015-04-21 07:02:48', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:03:28.165665"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d]  (4.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: fb31b6b9-d9d9-4d19-a191-0bd8850e811d) to Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 42419.21ms [ActiveJob] [Fogged::Resources::ZencoderPollJob] [fb31b6b9-d9d9-4d19-a191-0bd8850e811d] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 82112.19ms ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:04:55', '2015-04-21 07:04:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:04:55', '2015-04-21 07:04:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:04:55', '2015-04-21 07:04:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:04:55', '2015-04-21 07:04:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:04:55', '2015-04-21 07:04:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:04:55', '2015-04-21 07:04:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:04:55', '2015-04-21 07:04:55', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:04:58.197687"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9]  (4.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["run_at", "2015-04-21 07:04:58.235749"], ["created_at", "2015-04-21 07:04:58.236140"], ["updated_at", "2015-04-21 07:04:58.236140"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9] SQL (0.7ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "queue", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["run_at", "2015-04-21 07:05:08.207750"], ["handler", "--- !ruby/object:Fogged::Resources::ZencoderPollJob\narguments:\n- !ruby/object:Fogged::Resource\n raw_attributes:\n id: 538821867\n encoding_job_id: '1234567890'\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-21 07:04:55'\n updated_at: &6 2015-04-21 07:04:58.197687000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-21 07:04:55'\n updated_at: '2015-04-21 07:04:55'\n additional_types: {}\n materialized: true\n delegate_hash:\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-21 07:04:55'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-21 07:04:55.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\njob_id: 57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9\nqueue_name: default\n"], ["queue", "default"], ["created_at", "2015-04-21 07:04:58.240451"], ["updated_at", "2015-04-21 07:04:58.240451"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [57ef5fcc-c8b5-41f5-9294-0bd545ab0ec9] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 2167.33ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:05:23', '2015-04-21 07:05:23', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:05:23', '2015-04-21 07:05:23', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:05:23', '2015-04-21 07:05:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:05:23', '2015-04-21 07:05:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:05:23', '2015-04-21 07:05:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:05:23', '2015-04-21 07:05:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:05:23', '2015-04-21 07:05:23', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:05:23.280894"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 14e897d4-a134-4ec8-8f59-836422c08faa) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 14e897d4-a134-4ec8-8f59-836422c08faa\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["run_at", "2015-04-21 07:05:23.341410"], ["created_at", "2015-04-21 07:05:23.341704"], ["updated_at", "2015-04-21 07:05:23.341704"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa] SQL (0.3ms) INSERT INTO "delayed_jobs" ("run_at", "handler", "queue", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["run_at", "2015-04-21 07:05:33.286754"], ["handler", "--- !ruby/object:Fogged::Resources::ZencoderPollJob\narguments:\n- !ruby/object:Fogged::Resource\n raw_attributes:\n id: 538821867\n encoding_job_id: '1234567890'\n encoding_progress: 55\n extension: mov\n content_type: video/quicktime\n token: 1234567890mov\n name: resource mov 1\n width: \n height: \n uploading: f\n duration: \n created_at: '2015-04-21 07:05:23'\n updated_at: &6 2015-04-21 07:05:23.280894000 Z\n attributes: !ruby/object:ActiveRecord::AttributeSet\n attributes: !ruby/object:ActiveRecord::LazyAttributeHash\n types:\n id: &4 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n name: &1 !ruby/object:ActiveRecord::Type::String\n precision: \n scale: \n limit: \n token: *1\n width: &2 !ruby/object:ActiveRecord::Type::Integer\n precision: \n scale: \n limit: \n range: !ruby/range\n begin: -2147483648\n end: 2147483648\n excl: true\n height: *2\n extension: *1\n uploading: &5 !ruby/object:ActiveRecord::Type::Boolean\n precision: \n scale: \n limit: \n content_type: *1\n encoding_progress: *2\n encoding_job_id: *1\n duration: *2\n created_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: &3 !ruby/object:ActiveRecord::Type::DateTime\n precision: \n scale: \n limit: \n updated_at: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n values:\n id: 538821867\n name: resource mov 1\n token: 1234567890mov\n width: \n height: \n extension: mov\n uploading: f\n content_type: video/quicktime\n encoding_progress: 10\n encoding_job_id: '1234567890'\n duration: \n created_at: '2015-04-21 07:05:23'\n updated_at: '2015-04-21 07:05:23'\n additional_types: {}\n materialized: true\n delegate_hash:\n id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: id\n value_before_type_cast: 538821867\n type: *4\n value: 538821867\n encoding_job_id: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: encoding_job_id\n value_before_type_cast: '1234567890'\n type: *1\n value: '1234567890'\n encoding_progress: !ruby/object:ActiveRecord::Attribute::FromUser\n name: encoding_progress\n value_before_type_cast: 55\n type: *2\n value: 55\n extension: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: extension\n value_before_type_cast: mov\n type: *1\n value: mov\n content_type: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: content_type\n value_before_type_cast: video/quicktime\n type: *1\n value: video/quicktime\n token: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: token\n value_before_type_cast: 1234567890mov\n type: *1\n value: 1234567890mov\n name: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: name\n value_before_type_cast: resource mov 1\n type: *1\n value: resource mov 1\n width: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: width\n value_before_type_cast: \n type: *2\n value: \n height: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: height\n value_before_type_cast: \n type: *2\n value: \n uploading: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: uploading\n value_before_type_cast: f\n type: *5\n value: false\n duration: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: duration\n value_before_type_cast: \n type: *2\n value: \n created_at: !ruby/object:ActiveRecord::Attribute::FromDatabase\n name: created_at\n value_before_type_cast: '2015-04-21 07:05:23'\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: 2015-04-21 07:05:23.000000000 Z\n updated_at: !ruby/object:ActiveRecord::Attribute::FromUser\n name: updated_at\n value_before_type_cast: *6\n type: !ruby/object:ActiveRecord::AttributeMethods::TimeZoneConversion::TimeZoneConverter\n subtype: *3\n value: *6\n new_record: false\njob_id: 14e897d4-a134-4ec8-8f59-836422c08faa\nqueue_name: default\n"], ["queue", "default"], ["created_at", "2015-04-21 07:05:23.344990"], ["updated_at", "2015-04-21 07:05:23.344990"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [14e897d4-a134-4ec8-8f59-836422c08faa] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 73.96ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:06:56', '2015-04-21 07:06:56', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:06:56', '2015-04-21 07:06:56', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:06:56', '2015-04-21 07:06:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:06:56', '2015-04-21 07:06:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:06:56', '2015-04-21 07:06:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:06:56', '2015-04-21 07:06:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:06:56', '2015-04-21 07:06:56', 948421225)  (4.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:06:56.699897"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ec02a6ec-00a8-41c3-a99d-c47304faeba6) to DelayedJob(default) at 2015-04-21 07:07:06 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:07:06.706353"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: ec02a6ec-00a8-41c3-a99d-c47304faeba6\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:06:56.754722"], ["updated_at", "2015-04-21 07:06:56.754722"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ec02a6ec-00a8-41c3-a99d-c47304faeba6] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 66.82ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:07:07', '2015-04-21 07:07:07', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:07:07', '2015-04-21 07:07:07', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:07', '2015-04-21 07:07:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:07', '2015-04-21 07:07:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:07', '2015-04-21 07:07:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:07', '2015-04-21 07:07:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:07:07', '2015-04-21 07:07:07', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:07:07.434953"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 27cd9c25-08f8-4aed-8354-687275281292) to DelayedJob(default) at 2015-04-21 07:07:17 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:07:17.440645"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 27cd9c25-08f8-4aed-8354-687275281292\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:07:07.496046"], ["updated_at", "2015-04-21 07:07:07.496046"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [27cd9c25-08f8-4aed-8354-687275281292] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 71.46ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c48c5253-3cc4-4f7a-ac0e-3d942d6be8ad] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c48c5253-3cc4-4f7a-ac0e-3d942d6be8ad]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c48c5253-3cc4-4f7a-ac0e-3d942d6be8ad] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-21 07:07:07.776584"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c48c5253-3cc4-4f7a-ac0e-3d942d6be8ad]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c48c5253-3cc4-4f7a-ac0e-3d942d6be8ad] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 49.43ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5656d2a1-fad2-4629-ba58-690f79068e31] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [5656d2a1-fad2-4629-ba58-690f79068e31] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.51ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:07:08.290643"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37) to DelayedJob(default) at 2015-04-21 07:07:18 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:07:18.300447"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:07:08.315561"], ["updated_at", "2015-04-21 07:07:08.315561"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [60c8d6ee-0af4-4ae8-9fa7-f8442c09cd37] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 71.02ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:07:14', '2015-04-21 07:07:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:07:14', '2015-04-21 07:07:14', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 948421225)  (3.5ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 07:07:14.528181"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 1.5ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:07:14.635653"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c804f848-4cce-4adc-959c-9219b38e4480) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c804f848-4cce-4adc-959c-9219b38e4480\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 07:07:14.679659"], ["created_at", "2015-04-21 07:07:14.679968"], ["updated_at", "2015-04-21 07:07:14.679968"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 57ms (Views: 3.4ms | ActiveRecord: 3.3ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:07:14', '2015-04-21 07:07:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:07:14', '2015-04-21 07:07:14', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:14', '2015-04-21 07:07:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:07:14', '2015-04-21 07:07:14', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:07:14.961768"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c636ee48-05e7-4bc2-8150-26e62a4cd3ef) to DelayedJob(default) at 2015-04-21 07:07:24 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:07:24.965634"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c636ee48-05e7-4bc2-8150-26e62a4cd3ef\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:07:14.981821"], ["updated_at", "2015-04-21 07:07:14.981821"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c636ee48-05e7-4bc2-8150-26e62a4cd3ef] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 25.78ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38183743-9731-474f-840e-190fe9e6517f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38183743-9731-474f-840e-190fe9e6517f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38183743-9731-474f-840e-190fe9e6517f] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-21 07:07:15.233941"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38183743-9731-474f-840e-190fe9e6517f]  (1.1ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [38183743-9731-474f-840e-190fe9e6517f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 6.42ms  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7a4d33fb-9f8f-49ec-af24-57e1569f9481] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7a4d33fb-9f8f-49ec-af24-57e1569f9481] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.56ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:07:15.753645"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da]  (4.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a6d7a2e6-522b-4ce9-b973-ae9bb4c492da) to DelayedJob(default) at 2015-04-21 07:07:25 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:07:25.762920"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: a6d7a2e6-522b-4ce9-b973-ae9bb4c492da\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:07:15.779295"], ["updated_at", "2015-04-21 07:07:15.779295"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a6d7a2e6-522b-4ce9-b973-ae9bb4c492da] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 32.36ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:07:15', '2015-04-21 07:07:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:07:15', '2015-04-21 07:07:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:15', '2015-04-21 07:07:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:15', '2015-04-21 07:07:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:15', '2015-04-21 07:07:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:15', '2015-04-21 07:07:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:07:15', '2015-04-21 07:07:15', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-21 07:07:15.953524"], ["updated_at", "2015-04-21 07:07:15.953524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 07:07:15.959490"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-21 07:07:15.970475"], ["updated_at", "2015-04-21 07:07:15.970475"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:07:15.972879"], ["updated_at", "2015-04-21 07:07:15.972879"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ea04867b2bed6b9522c20edbe5bfa7df"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ea04867b2bed6b9522c20edbe5bfa7df"], ["created_at", "2015-04-21 07:07:15.977586"], ["updated_at", "2015-04-21 07:07:15.977586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fa889f8d0e0bd14488b3b905926f3dc1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fa889f8d0e0bd14488b3b905926f3dc1"], ["created_at", "2015-04-21 07:07:15.981134"], ["updated_at", "2015-04-21 07:07:15.981134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c2989538038fbe6f21bf829bf50bc133"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c2989538038fbe6f21bf829bf50bc133"], ["created_at", "2015-04-21 07:07:15.986587"], ["updated_at", "2015-04-21 07:07:15.986587"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "27f57ea36b1f916cf735bf7021183423"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "27f57ea36b1f916cf735bf7021183423"], ["created_at", "2015-04-21 07:07:15.989742"], ["updated_at", "2015-04-21 07:07:15.989742"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5b200e2ce29a60a84a005378ef79d7c0"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5b200e2ce29a60a84a005378ef79d7c0"], ["created_at", "2015-04-21 07:07:15.993996"], ["updated_at", "2015-04-21 07:07:15.993996"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 07:07:16.001965"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:07:16.107991"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ba15c5dd-bd46-4381-848b-a53d96ef059e) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: ba15c5dd-bd46-4381-848b-a53d96ef059e\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 07:07:16.148323"], ["created_at", "2015-04-21 07:07:16.148633"], ["updated_at", "2015-04-21 07:07:16.148633"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 14225656) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:07:16', '2015-04-21 07:07:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:07:16', '2015-04-21 07:07:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:16', '2015-04-21 07:07:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:16', '2015-04-21 07:07:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:16', '2015-04-21 07:07:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:16', '2015-04-21 07:07:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:07:16', '2015-04-21 07:07:16', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-21 07:07:16.300997"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 4.2ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4410f4445e40ca6a56e994d39733bc5d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "4410f4445e40ca6a56e994d39733bc5d"], ["created_at", "2015-04-21 07:07:16.366636"], ["updated_at", "2015-04-21 07:07:16.366636"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-21 07:07:16.375601"], ["updated_at", "2015-04-21 07:07:16.375601"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 2.2ms | ActiveRecord: 0.5ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.2ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 3ms (Views: 2.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 07:07:16.457396"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:07:16.463054"], ["updated_at", "2015-04-21 07:07:16.463054"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:07:16.468889"], ["updated_at", "2015-04-21 07:07:16.468889"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-21 07:07:16.470215"], ["updated_at", "2015-04-21 07:07:16.470215"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-21 07:07:16.471379"], ["updated_at", "2015-04-21 07:07:16.471379"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 07:07:17.072084"], ["id", 731805050]]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 07:07:17.309667"], ["id", 731805050]]  (0.6ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:07:17', '2015-04-21 07:07:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:07:17', '2015-04-21 07:07:17', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:17', '2015-04-21 07:07:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:17', '2015-04-21 07:07:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:17', '2015-04-21 07:07:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:07:17', '2015-04-21 07:07:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:07:17', '2015-04-21 07:07:17', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6dc269af06d549aa823f076b9ff7d0d5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "6dc269af06d549aa823f076b9ff7d0d5"], ["created_at", "2015-04-21 07:07:17.563072"], ["updated_at", "2015-04-21 07:07:17.563072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) INSERT INTO "delayed_jobs" ("handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["handler", "--- !ruby/struct:Fogged::Resources::AWSThumbnailJob\nresource_id: 14225656\n"], ["run_at", "2015-04-21 07:07:17.710260"], ["created_at", "2015-04-21 07:07:17.710709"], ["updated_at", "2015-04-21 07:07:17.710709"]]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 07:07:17.715230"], ["id", 14225656]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:07:18.002758"], ["id", 1039265257]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: d064a596-aa32-4b7d-b8a8-2446db3e46af) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: d064a596-aa32-4b7d-b8a8-2446db3e46af\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-04-21 07:07:18.044133"], ["created_at", "2015-04-21 07:07:18.044453"], ["updated_at", "2015-04-21 07:07:18.044453"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:09:24', '2015-04-21 07:09:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:09:24', '2015-04-21 07:09:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c6384c6193733be870f1a677abb1b2c7"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "c6384c6193733be870f1a677abb1b2c7"], ["created_at", "2015-04-21 07:09:24.062747"], ["updated_at", "2015-04-21 07:09:24.062747"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 22ms (Views: 1.8ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "438eda4d61f2efeb3af2ba55b16d5a04"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "438eda4d61f2efeb3af2ba55b16d5a04"], ["created_at", "2015-04-21 07:09:24.101847"], ["updated_at", "2015-04-21 07:09:24.101847"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "08c369ebc329327582307485507ee6b8"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "08c369ebc329327582307485507ee6b8"], ["created_at", "2015-04-21 07:09:24.106468"], ["updated_at", "2015-04-21 07:09:24.106468"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8006c2bc09a02caabd8e29bbb239dcad"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8006c2bc09a02caabd8e29bbb239dcad"], ["created_at", "2015-04-21 07:09:24.113373"], ["updated_at", "2015-04-21 07:09:24.113373"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f1104bffcc03f4a00c81eea64276ad15"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f1104bffcc03f4a00c81eea64276ad15"], ["created_at", "2015-04-21 07:09:24.116094"], ["updated_at", "2015-04-21 07:09:24.116094"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "39a85f9baae982695861f4e3f1ff5ae4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "39a85f9baae982695861f4e3f1ff5ae4"], ["created_at", "2015-04-21 07:09:24.119435"], ["updated_at", "2015-04-21 07:09:24.119435"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 07:09:24.128263"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:09:24.225211"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: aa6e1659-977b-4ea0-a2eb-b3371068acd9) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: aa6e1659-977b-4ea0-a2eb-b3371068acd9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 07:09:24.262604"], ["created_at", "2015-04-21 07:09:24.262918"], ["updated_at", "2015-04-21 07:09:24.262918"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:09:24', '2015-04-21 07:09:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:09:24', '2015-04-21 07:09:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:24', '2015-04-21 07:09:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:09:24', '2015-04-21 07:09:24', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-21 07:09:24.439979"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-21 07:09:24.472062"], ["updated_at", "2015-04-21 07:09:24.472062"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 07:09:24.476895"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-21 07:09:24.482056"], ["updated_at", "2015-04-21 07:09:24.482056"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:09:24.485257"], ["updated_at", "2015-04-21 07:09:24.485257"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 4.0ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6de5a48cd2478eec0814618dc978b36f"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "6de5a48cd2478eec0814618dc978b36f"], ["created_at", "2015-04-21 07:09:24.548217"], ["updated_at", "2015-04-21 07:09:24.548217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-21 07:09:24.557361"], ["updated_at", "2015-04-21 07:09:24.557361"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.4ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: e4108375-7855-4077-a0f2-3a6b119dbb6b) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.9ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: e4108375-7855-4077-a0f2-3a6b119dbb6b\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-04-21 07:09:24.714984"], ["created_at", "2015-04-21 07:09:24.715439"], ["updated_at", "2015-04-21 07:09:24.715439"]] [ActiveJob]  (0.8ms) commit transaction  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 07:09:24.720462"], ["id", 14225656]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:09:25.026247"], ["id", 1039265257]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 8bf42cff-7ff2-48d9-b5b4-fcfda9bfd227) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 8bf42cff-7ff2-48d9-b5b4-fcfda9bfd227\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-04-21 07:09:25.078749"], ["created_at", "2015-04-21 07:09:25.079049"], ["updated_at", "2015-04-21 07:09:25.079049"]] [ActiveJob]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 819504217) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:09:26', '2015-04-21 07:09:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:09:26', '2015-04-21 07:09:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 948421225)  (4.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 07:09:26.455179"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:09:26.584698"], ["id", 335514824]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 05429208-f107-4177-9666-fd5adc8fcad0) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 05429208-f107-4177-9666-fd5adc8fcad0\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 07:09:26.624675"], ["created_at", "2015-04-21 07:09:26.624993"], ["updated_at", "2015-04-21 07:09:26.624993"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 54ms (Views: 3.0ms | ActiveRecord: 3.1ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.9ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 14225656) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:09:26', '2015-04-21 07:09:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:09:26', '2015-04-21 07:09:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:26', '2015-04-21 07:09:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:09:26', '2015-04-21 07:09:26', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2dd159ae-f7ce-4801-b905-99ab98af214a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2dd159ae-f7ce-4801-b905-99ab98af214a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 40.46ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353]  (0.9ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 07:09:27.578334"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 07:09:27.828595"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4fe73dfd-a3e3-45b9-9211-d9cd5d188353] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 522.28ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:09:28', '2015-04-21 07:09:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:09:28', '2015-04-21 07:09:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:28', '2015-04-21 07:09:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:28', '2015-04-21 07:09:28', 849405871, 624739301, 819504217) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:28', '2015-04-21 07:09:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:09:28', '2015-04-21 07:09:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:09:28', '2015-04-21 07:09:28', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 07:09:28.108628"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:09:28.114179"], ["updated_at", "2015-04-21 07:09:28.114179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:09:28.123413"], ["updated_at", "2015-04-21 07:09:28.123413"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-21 07:09:28.125936"], ["updated_at", "2015-04-21 07:09:28.125936"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-21 07:09:28.128212"], ["updated_at", "2015-04-21 07:09:28.128212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968] SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:09:28.325703"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 0f86376c-9267-4c85-8ac0-b4634569e968) to DelayedJob(default) at 2015-04-21 07:09:38 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:09:38.334439"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 0f86376c-9267-4c85-8ac0-b4634569e968\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:09:28.364715"], ["updated_at", "2015-04-21 07:09:28.364715"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968]  (1.1ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0f86376c-9267-4c85-8ac0-b4634569e968] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 48.94ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.0ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [881e9ceb-2471-4843-8280-4c66f2392b71] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [881e9ceb-2471-4843-8280-4c66f2392b71]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [881e9ceb-2471-4843-8280-4c66f2392b71] SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-21 07:09:28.891024"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [881e9ceb-2471-4843-8280-4c66f2392b71]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [881e9ceb-2471-4843-8280-4c66f2392b71] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 14.22ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [daa02213-fa5b-465c-a6ef-e5aac3d6e27c] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [daa02213-fa5b-465c-a6ef-e5aac3d6e27c] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.84ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:09:29.541466"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f]  (4.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 22558510-1acd-4b7c-b822-6369db03c86f) to DelayedJob(default) at 2015-04-21 07:09:39 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:09:39.551404"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 22558510-1acd-4b7c-b822-6369db03c86f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:09:29.569251"], ["updated_at", "2015-04-21 07:09:29.569251"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f]  (2.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [22558510-1acd-4b7c-b822-6369db03c86f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 36.14ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:17:27', '2015-04-21 07:17:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:17:27', '2015-04-21 07:17:27', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:27', '2015-04-21 07:17:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:27', '2015-04-21 07:17:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:27', '2015-04-21 07:17:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:27', '2015-04-21 07:17:27', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:17:27', '2015-04-21 07:17:27', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:17:27.691074"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 248c1324-6ab6-4e9c-a346-432ac2e89d8f) to DelayedJob(default) at 2015-04-21 07:17:37 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f]  (0.3ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f] SQL (0.9ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:17:37.698404"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 248c1324-6ab6-4e9c-a346-432ac2e89d8f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:17:27.716831"], ["updated_at", "2015-04-21 07:17:27.716831"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [248c1324-6ab6-4e9c-a346-432ac2e89d8f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 35.6ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c6ec22c0-9a52-41f1-80c8-407153156379] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c6ec22c0-9a52-41f1-80c8-407153156379]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c6ec22c0-9a52-41f1-80c8-407153156379] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-04-21 07:17:27.982763"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c6ec22c0-9a52-41f1-80c8-407153156379]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c6ec22c0-9a52-41f1-80c8-407153156379] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 14.45ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1892417-7f54-45c1-9924-48edbe407ef7] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1892417-7f54-45c1-9924-48edbe407ef7] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.6ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f] SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-04-21 07:17:28.508038"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 11d93935-19d8-4a3f-922c-3a1ed4d8e26f) to DelayedJob(default) at 2015-04-21 07:17:38 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-04-21 07:17:38.515168"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 11d93935-19d8-4a3f-922c-3a1ed4d8e26f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-04-21 07:17:28.530557"], ["updated_at", "2015-04-21 07:17:28.530557"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [11d93935-19d8-4a3f-922c-3a1ed4d8e26f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 32.14ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:17:28', '2015-04-21 07:17:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:17:28', '2015-04-21 07:17:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:28', '2015-04-21 07:17:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:28', '2015-04-21 07:17:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:28', '2015-04-21 07:17:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:28', '2015-04-21 07:17:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:17:28', '2015-04-21 07:17:28', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 07:17:28.736914"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:17:28.750735"], ["updated_at", "2015-04-21 07:17:28.750735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:17:28.756844"], ["updated_at", "2015-04-21 07:17:28.756844"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-04-21 07:17:28.758215"], ["updated_at", "2015-04-21 07:17:28.758215"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-04-21 07:17:28.759972"], ["updated_at", "2015-04-21 07:17:28.759972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6d89f8c1312096d68f1e619491d632a0"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "6d89f8c1312096d68f1e619491d632a0"], ["created_at", "2015-04-21 07:17:28.772638"], ["updated_at", "2015-04-21 07:17:28.772638"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.6ms | ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-04-21 07:17:28.820461"], ["updated_at", "2015-04-21 07:17:28.820461"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-04-21 07:17:28.824678"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-04-21 07:17:28.831773"], ["updated_at", "2015-04-21 07:17:28.831773"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-04-21 07:17:28.836822"], ["updated_at", "2015-04-21 07:17:28.836822"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-04-21 07:17:28.873116"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 07:17:28.882169"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:17:28.992251"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 7e01e0fe-077c-4e7d-bba0-d6c153e175db) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 7e01e0fe-077c-4e7d-bba0-d6c153e175db\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 07:17:29.037898"], ["created_at", "2015-04-21 07:17:29.038345"], ["updated_at", "2015-04-21 07:17:29.038345"]] [ActiveJob]  (1.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 62ms (Views: 4.2ms | ActiveRecord: 4.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:17:29', '2015-04-21 07:17:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:17:29', '2015-04-21 07:17:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:29', '2015-04-21 07:17:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:29', '2015-04-21 07:17:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:29', '2015-04-21 07:17:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:29', '2015-04-21 07:17:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:17:29', '2015-04-21 07:17:29', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 18ms (Views: 5.6ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "86217d99eb56b2397835a264980c8844"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "86217d99eb56b2397835a264980c8844"], ["created_at", "2015-04-21 07:17:29.304068"], ["updated_at", "2015-04-21 07:17:29.304068"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-04-21 07:17:29.307715"], ["updated_at", "2015-04-21 07:17:29.307715"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.5ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5c145516-2199-423e-ba43-b2dba0a30198] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5c145516-2199-423e-ba43-b2dba0a30198] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 53.5ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-04-21 07:17:32.099101"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-04-21 07:17:32.778789"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f005342a-5321-4de5-b6de-68052dfe7ae8] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2956.16ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:17:33', '2015-04-21 07:17:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:17:33', '2015-04-21 07:17:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5b7c8da5f671fd6e6d3f6d2f9db9aae2"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5b7c8da5f671fd6e6d3f6d2f9db9aae2"], ["created_at", "2015-04-21 07:17:33.025174"], ["updated_at", "2015-04-21 07:17:33.025174"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6dfcf8634c7e7d7de09dfa77ddfcb7e4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6dfcf8634c7e7d7de09dfa77ddfcb7e4"], ["created_at", "2015-04-21 07:17:33.028568"], ["updated_at", "2015-04-21 07:17:33.028568"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "af6ced277c98bc7c55717912a973d857"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "af6ced277c98bc7c55717912a973d857"], ["created_at", "2015-04-21 07:17:33.034644"], ["updated_at", "2015-04-21 07:17:33.034644"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "78342b4555e9e8ac87ee29ed3b6e41fa"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "78342b4555e9e8ac87ee29ed3b6e41fa"], ["created_at", "2015-04-21 07:17:33.038464"], ["updated_at", "2015-04-21 07:17:33.038464"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "34aa7a46a25bad3c8b7e5fac545de7e6"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "34aa7a46a25bad3c8b7e5fac545de7e6"], ["created_at", "2015-04-21 07:17:33.044515"], ["updated_at", "2015-04-21 07:17:33.044515"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-04-21 07:17:33.051741"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:17:33.150910"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c4dafb35-73e4-461e-8373-aa9f8f8a37ee) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c4dafb35-73e4-461e-8373-aa9f8f8a37ee\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-04-21 07:17:33.186720"], ["created_at", "2015-04-21 07:17:33.187028"], ["updated_at", "2015-04-21 07:17:33.187028"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:17:33', '2015-04-21 07:17:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:17:33', '2015-04-21 07:17:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:33', '2015-04-21 07:17:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:17:33', '2015-04-21 07:17:33', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 6489ced2-32f8-48a1-b247-966cf65fcde6) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 6489ced2-32f8-48a1-b247-966cf65fcde6\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-04-21 07:17:33.514345"], ["created_at", "2015-04-21 07:17:33.514908"], ["updated_at", "2015-04-21 07:17:33.514908"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-04-21 07:17:33.520732"], ["id", 14225656]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-04-21 07:17:33.797462"], ["id", 1039265257]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 110a7f44-cd1c-46da-8f14-13a6ff19b1c3) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 110a7f44-cd1c-46da-8f14-13a6ff19b1c3\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-04-21 07:17:33.837312"], ["created_at", "2015-04-21 07:17:33.837675"], ["updated_at", "2015-04-21 07:17:33.837675"]] [ActiveJob]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 335514824) Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-04-21 07:17:35', '2015-04-21 07:17:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-04-21 07:17:35', '2015-04-21 07:17:35', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:35', '2015-04-21 07:17:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:35', '2015-04-21 07:17:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:35', '2015-04-21 07:17:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-04-21 07:17:35', '2015-04-21 07:17:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-04-21 07:17:35', '2015-04-21 07:17:35', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 08:59:35', '2015-05-26 08:59:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 08:59:35', '2015-05-26 08:59:35', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:35', '2015-05-26 08:59:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:35', '2015-05-26 08:59:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:35', '2015-05-26 08:59:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:35', '2015-05-26 08:59:35', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 08:59:35', '2015-05-26 08:59:35', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.4ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 539ba09e-f8f4-49da-9141-ba1bba30dc6b) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.2ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 539ba09e-f8f4-49da-9141-ba1bba30dc6b\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-05-26 08:59:36.056975"], ["created_at", "2015-05-26 08:59:36.057981"], ["updated_at", "2015-05-26 08:59:36.057981"]] [ActiveJob]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-05-26 08:59:36.065120"], ["id", 14225656]]  (1.1ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 08:59:36.318476"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 53f23e08-299c-4191-9b28-6e1f8a1b4d08) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 53f23e08-299c-4191-9b28-6e1f8a1b4d08\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 08:59:36.358696"], ["created_at", "2015-05-26 08:59:36.359122"], ["updated_at", "2015-05-26 08:59:36.359122"]] [ActiveJob]  (0.9ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ArgumentError: prepare called on a closed database: SELECT name FROM sqlite_master WHERE (type = 'table' OR type = 'view') AND NOT name = 'sqlite_sequence'  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 08:59:53', '2015-05-26 08:59:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 08:59:53', '2015-05-26 08:59:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:53', '2015-05-26 08:59:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:53', '2015-05-26 08:59:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:53', '2015-05-26 08:59:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 08:59:53', '2015-05-26 08:59:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 08:59:53', '2015-05-26 08:59:53', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs -----------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" ArgumentError: prepare called on a closed database: SELECT name FROM sqlite_master WHERE (type = 'table' OR type = 'view') AND NOT name = 'sqlite_sequence' ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:00:51', '2015-05-26 09:00:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:00:51', '2015-05-26 09:00:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:00:51', '2015-05-26 09:00:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:00:51', '2015-05-26 09:00:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:00:51', '2015-05-26 09:00:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:00:51', '2015-05-26 09:00:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:00:51', '2015-05-26 09:00:51', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:01:08', '2015-05-26 09:01:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:01:08', '2015-05-26 09:01:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:08', '2015-05-26 09:01:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:08', '2015-05-26 09:01:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:08', '2015-05-26 09:01:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:08', '2015-05-26 09:01:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:01:08', '2015-05-26 09:01:08', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:01:42', '2015-05-26 09:01:42', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:01:42', '2015-05-26 09:01:42', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:42', '2015-05-26 09:01:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:42', '2015-05-26 09:01:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:42', '2015-05-26 09:01:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:01:42', '2015-05-26 09:01:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:01:42', '2015-05-26 09:01:42', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:02:25', '2015-05-26 09:02:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:02:25', '2015-05-26 09:02:25', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:25', '2015-05-26 09:02:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:25', '2015-05-26 09:02:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:25', '2015-05-26 09:02:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:25', '2015-05-26 09:02:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:02:25', '2015-05-26 09:02:25', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:02:38', '2015-05-26 09:02:38', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:02:38', '2015-05-26 09:02:38', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:38', '2015-05-26 09:02:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:38', '2015-05-26 09:02:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:38', '2015-05-26 09:02:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:38', '2015-05-26 09:02:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:02:38', '2015-05-26 09:02:38', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:02:47', '2015-05-26 09:02:47', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:02:47', '2015-05-26 09:02:47', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:47', '2015-05-26 09:02:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:47', '2015-05-26 09:02:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:47', '2015-05-26 09:02:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:02:47', '2015-05-26 09:02:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:02:47', '2015-05-26 09:02:47', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:03:10', '2015-05-26 09:03:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:03:10', '2015-05-26 09:03:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:10', '2015-05-26 09:03:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:10', '2015-05-26 09:03:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:10', '2015-05-26 09:03:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:10', '2015-05-26 09:03:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:03:10', '2015-05-26 09:03:10', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:03:47', '2015-05-26 09:03:47', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:03:47', '2015-05-26 09:03:47', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:47', '2015-05-26 09:03:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:47', '2015-05-26 09:03:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:47', '2015-05-26 09:03:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:03:47', '2015-05-26 09:03:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:03:47', '2015-05-26 09:03:47', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:05:31', '2015-05-26 09:05:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:05:31', '2015-05-26 09:05:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:31', '2015-05-26 09:05:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:31', '2015-05-26 09:05:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:31', '2015-05-26 09:05:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:31', '2015-05-26 09:05:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:05:31', '2015-05-26 09:05:31', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:05:31.699662"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c2d6fa0f-5a2d-41c0-a79a-e04b9408e813) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c2d6fa0f-5a2d-41c0-a79a-e04b9408e813\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 09:05:31.741350"], ["created_at", "2015-05-26 09:05:31.741640"], ["updated_at", "2015-05-26 09:05:31.741640"]] [ActiveJob]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:05:40', '2015-05-26 09:05:40', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:05:40', '2015-05-26 09:05:40', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:40', '2015-05-26 09:05:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:40', '2015-05-26 09:05:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:40', '2015-05-26 09:05:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:40', '2015-05-26 09:05:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:05:40', '2015-05-26 09:05:40', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:05:51', '2015-05-26 09:05:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:05:51', '2015-05-26 09:05:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:51', '2015-05-26 09:05:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:51', '2015-05-26 09:05:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:51', '2015-05-26 09:05:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:05:51', '2015-05-26 09:05:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:05:51', '2015-05-26 09:05:51', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:05:51.637330"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a93ea13c-0e8a-4fa4-b5e5-5dcab014d9a8) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: a93ea13c-0e8a-4fa4-b5e5-5dcab014d9a8\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 09:05:51.679336"], ["created_at", "2015-05-26 09:05:51.679714"], ["updated_at", "2015-05-26 09:05:51.679714"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:04', '2015-05-26 09:06:04', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:04', '2015-05-26 09:06:04', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:04', '2015-05-26 09:06:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:04', '2015-05-26 09:06:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:04', '2015-05-26 09:06:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:04', '2015-05-26 09:06:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:04', '2015-05-26 09:06:04', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-05-26 09:06:04.911210"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-05-26 09:06:04.926765"], ["updated_at", "2015-05-26 09:06:04.926765"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-05-26 09:06:04.932012"], ["updated_at", "2015-05-26 09:06:04.932012"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-05-26 09:06:04.933075"], ["updated_at", "2015-05-26 09:06:04.933075"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-05-26 09:06:04.934079"], ["updated_at", "2015-05-26 09:06:04.934079"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-05-26 09:06:05.049792"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a9599486-beec-4dd3-99da-ff6cbf18fb00) to DelayedJob(default) at 2015-05-26 09:06:15 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-05-26 09:06:15.053676"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: a9599486-beec-4dd3-99da-ff6cbf18fb00\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-05-26 09:06:05.072900"], ["updated_at", "2015-05-26 09:06:05.072900"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9599486-beec-4dd3-99da-ff6cbf18fb00] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 28.43ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.7ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b4d857f2-097b-4b77-af3a-93c78b870f00] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b4d857f2-097b-4b77-af3a-93c78b870f00]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b4d857f2-097b-4b77-af3a-93c78b870f00] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-05-26 09:06:05.364444"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b4d857f2-097b-4b77-af3a-93c78b870f00]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [b4d857f2-097b-4b77-af3a-93c78b870f00] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 6.5ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0b416e7a-b632-483d-a4ae-7e92e567fe37] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [0b416e7a-b632-483d-a4ae-7e92e567fe37] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.42ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-05-26 09:06:05.941900"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: abbde3ec-e99f-43ab-af7d-db2a276f5034) to DelayedJob(default) at 2015-05-26 09:06:15 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-05-26 09:06:15.945934"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: abbde3ec-e99f-43ab-af7d-db2a276f5034\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-05-26 09:06:05.964805"], ["updated_at", "2015-05-26 09:06:05.964805"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [abbde3ec-e99f-43ab-af7d-db2a276f5034] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 27.22ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:06', '2015-05-26 09:06:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:06', '2015-05-26 09:06:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:06', '2015-05-26 09:06:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:06', '2015-05-26 09:06:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:06', '2015-05-26 09:06:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:06', '2015-05-26 09:06:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:06', '2015-05-26 09:06:06', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: a781581d-35bd-45fc-b298-38ab6f926805) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.8ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: a781581d-35bd-45fc-b298-38ab6f926805\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-05-26 09:06:06.298736"], ["created_at", "2015-05-26 09:06:06.299114"], ["updated_at", "2015-05-26 09:06:06.299114"]] [ActiveJob]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:06.303323"], ["id", 14225656]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:06.572474"], ["id", 1039265257]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a49db7a4-a53e-4779-af2f-684a1ceb4edb) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: a49db7a4-a53e-4779-af2f-684a1ceb4edb\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 09:06:06.611505"], ["created_at", "2015-05-26 09:06:06.611808"], ["updated_at", "2015-05-26 09:06:06.611808"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 29a76b38-9fc3-4b5b-8c47-df584c828c2d) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 29a76b38-9fc3-4b5b-8c47-df584c828c2d\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 09:06:06.912984"], ["created_at", "2015-05-26 09:06:06.913304"], ["updated_at", "2015-05-26 09:06:06.913304"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:08', '2015-05-26 09:06:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:08', '2015-05-26 09:06:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "019ef580180240bfe4aea1c286606404"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "019ef580180240bfe4aea1c286606404"], ["created_at", "2015-05-26 09:06:08.137181"], ["updated_at", "2015-05-26 09:06:08.137181"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "eb2aff3250fabc32decee088d67e303f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "eb2aff3250fabc32decee088d67e303f"], ["created_at", "2015-05-26 09:06:08.140567"], ["updated_at", "2015-05-26 09:06:08.140567"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1258d1d5eec16432b3aace0de6a70011"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1258d1d5eec16432b3aace0de6a70011"], ["created_at", "2015-05-26 09:06:08.146082"], ["updated_at", "2015-05-26 09:06:08.146082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "06efec94d08ac65712f2d0bdf3b15e2d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "06efec94d08ac65712f2d0bdf3b15e2d"], ["created_at", "2015-05-26 09:06:08.149456"], ["updated_at", "2015-05-26 09:06:08.149456"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4fa6d4c7c2e15163bab6106fc6f4df47"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4fa6d4c7c2e15163bab6106fc6f4df47"], ["created_at", "2015-05-26 09:06:08.154916"], ["updated_at", "2015-05-26 09:06:08.154916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-05-26 09:06:08.163149"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:08.273941"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 23f355d2-f793-4089-b78a-072cfba3e833) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 23f355d2-f793-4089-b78a-072cfba3e833\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-05-26 09:06:08.339789"], ["created_at", "2015-05-26 09:06:08.340046"], ["updated_at", "2015-05-26 09:06:08.340046"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 335514824) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:08', '2015-05-26 09:06:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:08', '2015-05-26 09:06:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-05-26 09:06:08.524326"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 4.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 33ms (Views: 4.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e7d560bf58bf0208e648b7f7fe6cabf6"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "e7d560bf58bf0208e648b7f7fe6cabf6"], ["created_at", "2015-05-26 09:06:08.596092"], ["updated_at", "2015-05-26 09:06:08.596092"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-05-26 09:06:08.600022"], ["updated_at", "2015-05-26 09:06:08.600022"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-05-26 09:06:08.639225"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:08.739668"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: b330910e-507b-4b86-a701-f1c745a6ca71) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: b330910e-507b-4b86-a701-f1c745a6ca71\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-05-26 09:06:08.769417"], ["created_at", "2015-05-26 09:06:08.769704"], ["updated_at", "2015-05-26 09:06:08.769704"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 41ms (Views: 3.0ms | ActiveRecord: 3.0ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:08', '2015-05-26 09:06:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:08', '2015-05-26 09:06:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:08', '2015-05-26 09:06:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:08', '2015-05-26 09:06:08', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-05-26 09:06:08.965346"], ["updated_at", "2015-05-26 09:06:08.965346"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-05-26 09:06:08.969639"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-05-26 09:06:08.973438"], ["updated_at", "2015-05-26 09:06:08.973438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-05-26 09:06:08.975741"], ["updated_at", "2015-05-26 09:06:08.975741"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "01dfe2da2c9f6a88b83de1d95f21e85d"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "01dfe2da2c9f6a88b83de1d95f21e85d"], ["created_at", "2015-05-26 09:06:08.982019"], ["updated_at", "2015-05-26 09:06:08.982019"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.2ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7f819733-8b53-4c0e-a0c5-078c651359d6] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7f819733-8b53-4c0e-a0c5-078c651359d6] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 47.94ms  (0.7ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-05-26 09:06:09.815257"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-05-26 09:06:10.205680"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ccef3bfe-6ff5-4f9a-b504-2f9c5c790af3] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 774.49ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:27', '2015-05-26 09:06:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:27', '2015-05-26 09:06:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 98413728, 245026679, 784085492) Fixture Insert (0.0ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1a2d1c5987f008339089a9749957f659"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1a2d1c5987f008339089a9749957f659"], ["created_at", "2015-05-26 09:06:27.187249"], ["updated_at", "2015-05-26 09:06:27.187249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a749c909cbe6d5341adf5d72c1cb3cf3"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a749c909cbe6d5341adf5d72c1cb3cf3"], ["created_at", "2015-05-26 09:06:27.190749"], ["updated_at", "2015-05-26 09:06:27.190749"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4875582420c2525aebf0478427e153ab"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4875582420c2525aebf0478427e153ab"], ["created_at", "2015-05-26 09:06:27.195709"], ["updated_at", "2015-05-26 09:06:27.195709"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "165590703bd8fc041a3d3883dafe60df"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "165590703bd8fc041a3d3883dafe60df"], ["created_at", "2015-05-26 09:06:27.198422"], ["updated_at", "2015-05-26 09:06:27.198422"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7a76f4bff6cb55b4a80c8ebbdbd42f83"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7a76f4bff6cb55b4a80c8ebbdbd42f83"], ["created_at", "2015-05-26 09:06:27.202351"], ["updated_at", "2015-05-26 09:06:27.202351"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-05-26 09:06:27.217515"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:27.318850"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ace27b92-2fbd-46a8-8455-085af0ad621d) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: ace27b92-2fbd-46a8-8455-085af0ad621d\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-05-26 09:06:27.359523"], ["created_at", "2015-05-26 09:06:27.359803"], ["updated_at", "2015-05-26 09:06:27.359803"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:27', '2015-05-26 09:06:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:27', '2015-05-26 09:06:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:27', '2015-05-26 09:06:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:27', '2015-05-26 09:06:27', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ae62a9ca-a475-49ef-8296-8bcfcc220f1b] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ae62a9ca-a475-49ef-8296-8bcfcc220f1b] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 29.86ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c] SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-05-26 09:06:28.204387"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-05-26 09:06:28.417063"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [5f2fda77-e40d-4275-abb2-6da50ca2e99c] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 448.43ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:28', '2015-05-26 09:06:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:28', '2015-05-26 09:06:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:28', '2015-05-26 09:06:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:28', '2015-05-26 09:06:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:28', '2015-05-26 09:06:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:28', '2015-05-26 09:06:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:28', '2015-05-26 09:06:28', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-05-26 09:06:28.653417"], ["updated_at", "2015-05-26 09:06:28.653417"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-05-26 09:06:28.658104"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-05-26 09:06:28.661910"], ["updated_at", "2015-05-26 09:06:28.661910"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-05-26 09:06:28.665634"], ["updated_at", "2015-05-26 09:06:28.665634"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 32ms (Views: 4.0ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8a6b2b9ddaa675a7a52c8a544bd4acaf"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "8a6b2b9ddaa675a7a52c8a544bd4acaf"], ["created_at", "2015-05-26 09:06:28.727930"], ["updated_at", "2015-05-26 09:06:28.727930"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-05-26 09:06:28.736488"], ["updated_at", "2015-05-26 09:06:28.736488"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 2fc50117-2b87-4973-83be-571d79a86e1e) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 2fc50117-2b87-4973-83be-571d79a86e1e\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-05-26 09:06:28.893311"], ["created_at", "2015-05-26 09:06:28.893745"], ["updated_at", "2015-05-26 09:06:28.893745"]] [ActiveJob]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:28.898461"], ["id", 14225656]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:29.148073"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 01a7d2ab-b0c7-4f99-8d88-69be812d3063) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 01a7d2ab-b0c7-4f99-8d88-69be812d3063\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 09:06:29.182003"], ["created_at", "2015-05-26 09:06:29.182310"], ["updated_at", "2015-05-26 09:06:29.182310"]] [ActiveJob]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: d30eb029-407f-4b9b-80e2-7ee1c4f15759) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: d30eb029-407f-4b9b-80e2-7ee1c4f15759\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-05-26 09:06:29.465826"], ["created_at", "2015-05-26 09:06:29.466201"], ["updated_at", "2015-05-26 09:06:29.466201"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:30', '2015-05-26 09:06:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:30', '2015-05-26 09:06:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-05-26 09:06:30.609398"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (4.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-05-26 09:06:30.708651"], ["id", 335514824]]  (1.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a1eed395-1397-4496-ac02-303feed297f6) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: a1eed395-1397-4496-ac02-303feed297f6\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-05-26 09:06:30.742895"], ["created_at", "2015-05-26 09:06:30.743172"], ["updated_at", "2015-05-26 09:06:30.743172"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 47ms (Views: 3.7ms | ActiveRecord: 3.9ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-05-26 09:06:30', '2015-05-26 09:06:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-05-26 09:06:30', '2015-05-26 09:06:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-05-26 09:06:30', '2015-05-26 09:06:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-05-26 09:06:30', '2015-05-26 09:06:30', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-05-26 09:06:30.938174"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0a655e8c8da884176c90fddb0837053e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "0a655e8c8da884176c90fddb0837053e"], ["created_at", "2015-05-26 09:06:30.948649"], ["updated_at", "2015-05-26 09:06:30.948649"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.8ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-05-26 09:06:30.981578"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-05-26 09:06:30.986216"], ["updated_at", "2015-05-26 09:06:30.986216"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-05-26 09:06:30.992825"], ["updated_at", "2015-05-26 09:06:30.992825"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-05-26 09:06:30.994292"], ["updated_at", "2015-05-26 09:06:30.994292"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-05-26 09:06:30.995372"], ["updated_at", "2015-05-26 09:06:30.995372"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-05-26 09:06:31.104149"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: e6be692f-1827-439c-8f93-acff78e43d37) to DelayedJob(default) at 2015-05-26 09:06:41 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-05-26 09:06:41.108018"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: e6be692f-1827-439c-8f93-acff78e43d37\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-05-26 09:06:31.123454"], ["updated_at", "2015-05-26 09:06:31.123454"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e6be692f-1827-439c-8f93-acff78e43d37] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 23.64ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4c0c359-734a-43ca-8900-87ed53a73d61] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4c0c359-734a-43ca-8900-87ed53a73d61]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4c0c359-734a-43ca-8900-87ed53a73d61] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-05-26 09:06:31.379097"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4c0c359-734a-43ca-8900-87ed53a73d61]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [d4c0c359-734a-43ca-8900-87ed53a73d61] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 6.21ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a5c97ef2-300f-4c85-8b2c-b1b3115b8c9a] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a5c97ef2-300f-4c85-8b2c-b1b3115b8c9a] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.38ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-05-26 09:06:31.914532"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 6e40cca0-7f2c-4125-bdb0-c4da4905592a) to DelayedJob(default) at 2015-05-26 09:06:41 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-05-26 09:06:41.922906"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 6e40cca0-7f2c-4125-bdb0-c4da4905592a\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-05-26 09:06:31.937705"], ["updated_at", "2015-05-26 09:06:31.937705"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6e40cca0-7f2c-4125-bdb0-c4da4905592a] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 27.6ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]] ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:28:14', '2015-08-14 14:28:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:28:14', '2015-08-14 14:28:14', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:14', '2015-08-14 14:28:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:14', '2015-08-14 14:28:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:14', '2015-08-14 14:28:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:14', '2015-08-14 14:28:14', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:28:14', '2015-08-14 14:28:14', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 8ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0f3a014690843066ebea71b028b3fd30"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "0f3a014690843066ebea71b028b3fd30"], ["created_at", "2015-08-14 14:28:15.026957"], ["updated_at", "2015-08-14 14:28:15.026957"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (1.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.4ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-08-14 14:28:15.196949"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 1ad92482-339a-4226-9eca-4128d5b49898) to DelayedJob(default) at 2015-08-14 14:28:25 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898] SQL (0.9ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-08-14 14:28:25.203488"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 1ad92482-339a-4226-9eca-4128d5b49898\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-08-14 14:28:15.217768"], ["updated_at", "2015-08-14 14:28:15.217768"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [1ad92482-339a-4226-9eca-4128d5b49898] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 25.95ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [afe99184-7bcf-4e81-908b-322106d9c31c] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [afe99184-7bcf-4e81-908b-322106d9c31c]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [afe99184-7bcf-4e81-908b-322106d9c31c] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-08-14 14:28:15.459664"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [afe99184-7bcf-4e81-908b-322106d9c31c]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [afe99184-7bcf-4e81-908b-322106d9c31c] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 8.8ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9fbdf6a3-7ab1-48dd-9b79-5bb58e439435] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [9fbdf6a3-7ab1-48dd-9b79-5bb58e439435] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.48ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-08-14 14:28:15.933220"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c1fbd76c-f908-42c7-a45f-4626da59285f) to DelayedJob(default) at 2015-08-14 14:28:25 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-08-14 14:28:25.939306"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c1fbd76c-f908-42c7-a45f-4626da59285f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-08-14 14:28:15.952621"], ["updated_at", "2015-08-14 14:28:15.952621"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c1fbd76c-f908-42c7-a45f-4626da59285f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 23.97ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:28:16', '2015-08-14 14:28:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:28:16', '2015-08-14 14:28:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-08-14 14:28:16.112926"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:28:16.215924"], ["id", 335514824]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 83df88e0-a2f3-4c0a-a8d7-d0aa19c931f1) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 83df88e0-a2f3-4c0a-a8d7-d0aa19c931f1\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-08-14 14:28:16.246570"], ["created_at", "2015-08-14 14:28:16.246850"], ["updated_at", "2015-08-14 14:28:16.246850"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 42ms (Views: 2.7ms | ActiveRecord: 2.9ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:28:16', '2015-08-14 14:28:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:28:16', '2015-08-14 14:28:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:16', '2015-08-14 14:28:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:28:16', '2015-08-14 14:28:16', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: d6d044b7-4775-410d-8fef-1ebf487188b0) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: d6d044b7-4775-410d-8fef-1ebf487188b0\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-08-14 14:28:16.550142"], ["created_at", "2015-08-14 14:28:16.550526"], ["updated_at", "2015-08-14 14:28:16.550526"]] [ActiveJob]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-08-14 14:28:16.554502"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:28:16.778645"], ["id", 1039265257]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: e8d530b9-4679-40a9-82e9-d9323518a241) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: e8d530b9-4679-40a9-82e9-d9323518a241\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-08-14 14:28:16.842292"], ["created_at", "2015-08-14 14:28:16.842573"], ["updated_at", "2015-08-14 14:28:16.842573"]] [ActiveJob]  (1.2ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 3408b801-bede-4e7c-8139-622e8f923acd) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 3408b801-bede-4e7c-8139-622e8f923acd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-08-14 14:28:17.120392"], ["created_at", "2015-08-14 14:28:17.120710"], ["updated_at", "2015-08-14 14:28:17.120710"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:28:18', '2015-08-14 14:28:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:28:18', '2015-08-14 14:28:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:18', '2015-08-14 14:28:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:18', '2015-08-14 14:28:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:18', '2015-08-14 14:28:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:18', '2015-08-14 14:28:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:28:18', '2015-08-14 14:28:18', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-08-14 14:28:18.071497"], ["updated_at", "2015-08-14 14:28:18.071497"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-08-14 14:28:18.076360"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-08-14 14:28:18.080409"], ["updated_at", "2015-08-14 14:28:18.080409"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:28:18.082593"], ["updated_at", "2015-08-14 14:28:18.082593"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-08-14 14:28:18.091907"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef27ec41-143e-4396-bc76-0214fec90389] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef27ec41-143e-4396-bc76-0214fec90389] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 56.08ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3] SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-08-14 14:28:19.034977"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-08-14 14:28:19.349289"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0be7b1b-ec40-4b8d-b99d-377c518107c3] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 824.41ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:28:19', '2015-08-14 14:28:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:28:19', '2015-08-14 14:28:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "01554b8272c2a3422e1932d406606df4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "01554b8272c2a3422e1932d406606df4"], ["created_at", "2015-08-14 14:28:19.549496"], ["updated_at", "2015-08-14 14:28:19.549496"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "42c044c2d760dd64707399ca00cca636"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "42c044c2d760dd64707399ca00cca636"], ["created_at", "2015-08-14 14:28:19.553187"], ["updated_at", "2015-08-14 14:28:19.553187"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1c3cd7566f7573356bb1b43ec4ba8f30"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1c3cd7566f7573356bb1b43ec4ba8f30"], ["created_at", "2015-08-14 14:28:19.558305"], ["updated_at", "2015-08-14 14:28:19.558305"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9a072c2b4de13a789a8e30093afe9aa5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9a072c2b4de13a789a8e30093afe9aa5"], ["created_at", "2015-08-14 14:28:19.561300"], ["updated_at", "2015-08-14 14:28:19.561300"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "feceb371cb7e4c4e3a4867040530f538"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "feceb371cb7e4c4e3a4867040530f538"], ["created_at", "2015-08-14 14:28:19.565679"], ["updated_at", "2015-08-14 14:28:19.565679"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-08-14 14:28:19.573931"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:28:19.667843"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: fb3d4a4d-fcd5-4488-accc-eeda00a6e61b) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: fb3d4a4d-fcd5-4488-accc-eeda00a6e61b\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-08-14 14:28:19.695764"], ["created_at", "2015-08-14 14:28:19.696180"], ["updated_at", "2015-08-14 14:28:19.696180"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:28:19', '2015-08-14 14:28:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:28:19', '2015-08-14 14:28:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:28:19', '2015-08-14 14:28:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:28:19', '2015-08-14 14:28:19', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 30ms (Views: 3.6ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b4a7206bb379a9456ad2b7d79f742199"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "b4a7206bb379a9456ad2b7d79f742199"], ["created_at", "2015-08-14 14:28:19.926877"], ["updated_at", "2015-08-14 14:28:19.926877"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-08-14 14:28:19.933010"], ["updated_at", "2015-08-14 14:28:19.933010"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-08-14 14:28:19.965846"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:28:19.970853"], ["updated_at", "2015-08-14 14:28:19.970853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:28:19.977570"], ["updated_at", "2015-08-14 14:28:19.977570"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-08-14 14:28:19.978777"], ["updated_at", "2015-08-14 14:28:19.978777"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-08-14 14:28:19.979876"], ["updated_at", "2015-08-14 14:28:19.979876"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:31:16', '2015-08-14 14:31:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:31:16', '2015-08-14 14:31:16', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:16', '2015-08-14 14:31:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:16', '2015-08-14 14:31:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:16', '2015-08-14 14:31:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:16', '2015-08-14 14:31:16', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:31:16', '2015-08-14 14:31:16', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 5b6b7410-cdd2-461b-8ed8-6ad6c6df4b1b) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.0ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 5b6b7410-cdd2-461b-8ed8-6ad6c6df4b1b\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-08-14 14:31:16.703653"], ["created_at", "2015-08-14 14:31:16.704097"], ["updated_at", "2015-08-14 14:31:16.704097"]] [ActiveJob]  (1.1ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-08-14 14:31:16.710670"], ["id", 14225656]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:31:16.953900"], ["id", 1039265257]]  (0.6ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 30cf0c7c-99f1-488b-ad90-ac699da8f4c9) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 30cf0c7c-99f1-488b-ad90-ac699da8f4c9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-08-14 14:31:16.990545"], ["created_at", "2015-08-14 14:31:16.990824"], ["updated_at", "2015-08-14 14:31:16.990824"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: fce6f8bb-61d1-424d-bd3f-1118e9a793f2) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: fce6f8bb-61d1-424d-bd3f-1118e9a793f2\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-08-14 14:31:17.231791"], ["created_at", "2015-08-14 14:31:17.232156"], ["updated_at", "2015-08-14 14:31:17.232156"]] [ActiveJob]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:31:18', '2015-08-14 14:31:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:31:18', '2015-08-14 14:31:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-08-14 14:31:18.223724"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.3ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:31:18.329230"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 7c58d67b-b705-4746-84ec-6df4dce88619) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 7c58d67b-b705-4746-84ec-6df4dce88619\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-08-14 14:31:18.364018"], ["created_at", "2015-08-14 14:31:18.364324"], ["updated_at", "2015-08-14 14:31:18.364324"]] [ActiveJob]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 46ms (Views: 3.2ms | ActiveRecord: 3.4ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:31:18', '2015-08-14 14:31:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:31:18', '2015-08-14 14:31:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:31:18', '2015-08-14 14:31:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:31:18', '2015-08-14 14:31:18', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-08-14 14:31:18.539860"], ["updated_at", "2015-08-14 14:31:18.539860"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-08-14 14:31:18.544672"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-08-14 14:31:18.556766"], ["updated_at", "2015-08-14 14:31:18.556766"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:31:18.559249"], ["updated_at", "2015-08-14 14:31:18.559249"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 31ms (Views: 3.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9f94a47e7091d251ab9e3a222cf28d17"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "9f94a47e7091d251ab9e3a222cf28d17"], ["created_at", "2015-08-14 14:31:18.619580"], ["updated_at", "2015-08-14 14:31:18.619580"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-08-14 14:31:18.626509"], ["updated_at", "2015-08-14 14:31:18.626509"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 17ms (Views: 2.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ed0c9f10ffe155add8a9b5e565a3caee"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ed0c9f10ffe155add8a9b5e565a3caee"], ["created_at", "2015-08-14 14:31:18.668169"], ["updated_at", "2015-08-14 14:31:18.668169"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2acc2dcbe43f89e6871af0428994722d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2acc2dcbe43f89e6871af0428994722d"], ["created_at", "2015-08-14 14:31:18.670969"], ["updated_at", "2015-08-14 14:31:18.670969"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1173329a9d99e0215ff2f4d6b0a19ad1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1173329a9d99e0215ff2f4d6b0a19ad1"], ["created_at", "2015-08-14 14:31:18.675743"], ["updated_at", "2015-08-14 14:31:18.675743"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "160409f2e859460e5bc88bc9f266d191"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "160409f2e859460e5bc88bc9f266d191"], ["created_at", "2015-08-14 14:31:18.678250"], ["updated_at", "2015-08-14 14:31:18.678250"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "efd23d1a40e2fb355b666c79d2a132ef"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "efd23d1a40e2fb355b666c79d2a132ef"], ["created_at", "2015-08-14 14:31:18.681513"], ["updated_at", "2015-08-14 14:31:18.681513"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-08-14 14:31:18.688972"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:31:18.775520"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c55b7a64-6932-410e-ba53-3944dda1c14e) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c55b7a64-6932-410e-ba53-3944dda1c14e\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-08-14 14:31:18.806665"], ["created_at", "2015-08-14 14:31:18.807023"], ["updated_at", "2015-08-14 14:31:18.807023"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:33:51', '2015-08-14 14:33:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:33:51', '2015-08-14 14:33:51', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:51', '2015-08-14 14:33:51', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:51', '2015-08-14 14:33:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:51', '2015-08-14 14:33:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:51', '2015-08-14 14:33:51', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:33:51', '2015-08-14 14:33:51', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-08-14 14:33:51.111115"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: c9e58553-fc33-4f5a-9395-cab91402530f) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.1ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: c9e58553-fc33-4f5a-9395-cab91402530f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-08-14 14:33:51.252227"], ["created_at", "2015-08-14 14:33:51.252736"], ["updated_at", "2015-08-14 14:33:51.252736"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-08-14 14:33:51.261604"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:33:51.504017"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: b0f0603b-542d-4d6b-9dcc-4aa6a01e14bd) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: b0f0603b-542d-4d6b-9dcc-4aa6a01e14bd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-08-14 14:33:51.538391"], ["created_at", "2015-08-14 14:33:51.538715"], ["updated_at", "2015-08-14 14:33:51.538715"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 97be9d8a-f690-4580-be2a-521d1cbe2c3b) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 97be9d8a-f690-4580-be2a-521d1cbe2c3b\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-08-14 14:33:51.789299"], ["created_at", "2015-08-14 14:33:51.789732"], ["updated_at", "2015-08-14 14:33:51.789732"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:33:52', '2015-08-14 14:33:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:33:52', '2015-08-14 14:33:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:52', '2015-08-14 14:33:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:52', '2015-08-14 14:33:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:52', '2015-08-14 14:33:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:52', '2015-08-14 14:33:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:33:52', '2015-08-14 14:33:52', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-08-14 14:33:52.847070"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: ac9a58d6-3d9f-42f4-b400-2e321ae16bb6) to DelayedJob(default) at 2015-08-14 14:34:02 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-08-14 14:34:02.851034"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: ac9a58d6-3d9f-42f4-b400-2e321ae16bb6\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-08-14 14:33:52.867879"], ["updated_at", "2015-08-14 14:33:52.867879"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ac9a58d6-3d9f-42f4-b400-2e321ae16bb6] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 26.65ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [568b56ef-5b4c-4169-983c-85d2f4cb6e6d] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [568b56ef-5b4c-4169-983c-85d2f4cb6e6d]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [568b56ef-5b4c-4169-983c-85d2f4cb6e6d] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-08-14 14:33:53.106457"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [568b56ef-5b4c-4169-983c-85d2f4cb6e6d]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [568b56ef-5b4c-4169-983c-85d2f4cb6e6d] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 7.34ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [3289021c-dfcd-4f86-a0e8-30f43e99f77d] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [3289021c-dfcd-4f86-a0e8-30f43e99f77d] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.6ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-08-14 14:33:53.582562"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 7251aa7e-5ad3-47c5-8d69-5d52443079e2) to DelayedJob(default) at 2015-08-14 14:34:03 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-08-14 14:34:03.591037"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 7251aa7e-5ad3-47c5-8d69-5d52443079e2\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-08-14 14:33:53.609037"], ["updated_at", "2015-08-14 14:33:53.609037"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7251aa7e-5ad3-47c5-8d69-5d52443079e2] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 31.43ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:33:53', '2015-08-14 14:33:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:33:53', '2015-08-14 14:33:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:53', '2015-08-14 14:33:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:53', '2015-08-14 14:33:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:53', '2015-08-14 14:33:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:53', '2015-08-14 14:33:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:33:53', '2015-08-14 14:33:53', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6b5289d8-bfc5-4d82-b9f5-e7b00c5cdb15] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6b5289d8-bfc5-4d82-b9f5-e7b00c5cdb15] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 61.07ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-08-14 14:33:54.996575"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-08-14 14:33:55.299585"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [40a49ad9-03b5-4048-b952-69105c580753] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1158.59ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:33:55', '2015-08-14 14:33:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:33:55', '2015-08-14 14:33:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-08-14 14:33:55.471440"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:33:55.566597"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 40df4d88-4953-4a03-9dce-c7659ca20565) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.1ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 40df4d88-4953-4a03-9dce-c7659ca20565\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-08-14 14:33:55.601798"], ["created_at", "2015-08-14 14:33:55.602086"], ["updated_at", "2015-08-14 14:33:55.602086"]] [ActiveJob]  (0.7ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 48ms (Views: 2.8ms | ActiveRecord: 3.6ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 517391740) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:33:55', '2015-08-14 14:33:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:33:55', '2015-08-14 14:33:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:55', '2015-08-14 14:33:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:33:55', '2015-08-14 14:33:55', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 36ms (Views: 3.5ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7f1638655012b8b3b1838da85e55c24f"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "7f1638655012b8b3b1838da85e55c24f"], ["created_at", "2015-08-14 14:33:55.846289"], ["updated_at", "2015-08-14 14:33:55.846289"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-08-14 14:33:55.856474"], ["updated_at", "2015-08-14 14:33:55.856474"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.3ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b3ff1cf6c9709a0bcf71b4c6dc3cbf06"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b3ff1cf6c9709a0bcf71b4c6dc3cbf06"], ["created_at", "2015-08-14 14:33:55.883075"], ["updated_at", "2015-08-14 14:33:55.883075"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4540361736e42815e43d84d91b533e4d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4540361736e42815e43d84d91b533e4d"], ["created_at", "2015-08-14 14:33:55.885864"], ["updated_at", "2015-08-14 14:33:55.885864"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cb424742f584a8e1fb947fd373c7528a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cb424742f584a8e1fb947fd373c7528a"], ["created_at", "2015-08-14 14:33:55.890774"], ["updated_at", "2015-08-14 14:33:55.890774"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0ab99907496a7759731eb58f7a0377f9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0ab99907496a7759731eb58f7a0377f9"], ["created_at", "2015-08-14 14:33:55.893318"], ["updated_at", "2015-08-14 14:33:55.893318"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "889433c3521586023b333d6df4f66116"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "889433c3521586023b333d6df4f66116"], ["created_at", "2015-08-14 14:33:55.896524"], ["updated_at", "2015-08-14 14:33:55.896524"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-08-14 14:33:55.910252"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-08-14 14:33:55.992242"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 00670b90-4920-459e-8a2b-07f03f3f19b1) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 00670b90-4920-459e-8a2b-07f03f3f19b1\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-08-14 14:33:56.025985"], ["created_at", "2015-08-14 14:33:56.026374"], ["updated_at", "2015-08-14 14:33:56.026374"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-08-14 14:33:56', '2015-08-14 14:33:56', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-08-14 14:33:56', '2015-08-14 14:33:56', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:56', '2015-08-14 14:33:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:56', '2015-08-14 14:33:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:56', '2015-08-14 14:33:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-08-14 14:33:56', '2015-08-14 14:33:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-08-14 14:33:56', '2015-08-14 14:33:56', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-08-14 14:33:56.206919"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:33:56.212808"], ["updated_at", "2015-08-14 14:33:56.212808"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:33:56.219666"], ["updated_at", "2015-08-14 14:33:56.219666"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-08-14 14:33:56.220899"], ["updated_at", "2015-08-14 14:33:56.220899"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-08-14 14:33:56.221969"], ["updated_at", "2015-08-14 14:33:56.221969"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-08-14 14:33:56.230099"], ["updated_at", "2015-08-14 14:33:56.230099"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-08-14 14:33:56.234937"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-08-14 14:33:56.239581"], ["updated_at", "2015-08-14 14:33:56.239581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-08-14 14:33:56.242358"], ["updated_at", "2015-08-14 14:33:56.242358"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "64e7517411461ec5f0ba5b08847b4eea"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "64e7517411461ec5f0ba5b08847b4eea"], ["created_at", "2015-08-14 14:33:56.262298"], ["updated_at", "2015-08-14 14:33:56.262298"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 09:37:52', '2015-10-16 09:37:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 09:37:52', '2015-10-16 09:37:52', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:52', '2015-10-16 09:37:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:52', '2015-10-16 09:37:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:52', '2015-10-16 09:37:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:52', '2015-10-16 09:37:52', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 09:37:52', '2015-10-16 09:37:52', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: c759d592-d3d7-4df1-8b1d-10348c086d10) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.2ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: c759d592-d3d7-4df1-8b1d-10348c086d10\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 09:37:52.337375"], ["created_at", "2015-10-16 09:37:52.337843"], ["updated_at", "2015-10-16 09:37:52.337843"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 09:37:52.342983"], ["id", 14225656]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 09:37:52.627992"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 4d4710f8-1f2f-4fbe-a645-605a40fbccec) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 4d4710f8-1f2f-4fbe-a645-605a40fbccec\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 09:37:52.661153"], ["created_at", "2015-10-16 09:37:52.661476"], ["updated_at", "2015-10-16 09:37:52.661476"]] [ActiveJob]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 53da76da-042c-420e-aab7-4cc125dcfcd4) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 53da76da-042c-420e-aab7-4cc125dcfcd4\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 09:37:52.942219"], ["created_at", "2015-10-16 09:37:52.942547"], ["updated_at", "2015-10-16 09:37:52.942547"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 09:37:53', '2015-10-16 09:37:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 09:37:53', '2015-10-16 09:37:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:53', '2015-10-16 09:37:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:53', '2015-10-16 09:37:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:53', '2015-10-16 09:37:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:53', '2015-10-16 09:37:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 09:37:53', '2015-10-16 09:37:53', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b44c8e7bfc02d9b85aa62c84aa5099c6"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "b44c8e7bfc02d9b85aa62c84aa5099c6"], ["created_at", "2015-10-16 09:37:54.019427"], ["updated_at", "2015-10-16 09:37:54.019427"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 2.5ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 09:37:54.060173"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 09:37:54.161623"], ["id", 335514824]]  (1.2ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 17ca27e2-67d2-4b47-9bbf-343b6f6f6548) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 17ca27e2-67d2-4b47-9bbf-343b6f6f6548\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 09:37:54.193359"], ["created_at", "2015-10-16 09:37:54.193673"], ["updated_at", "2015-10-16 09:37:54.193673"]] [ActiveJob]  (1.1ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 44ms (Views: 3.0ms | ActiveRecord: 4.2ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 09:37:54', '2015-10-16 09:37:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 09:37:54', '2015-10-16 09:37:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:54', '2015-10-16 09:37:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:54', '2015-10-16 09:37:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:54', '2015-10-16 09:37:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:54', '2015-10-16 09:37:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 09:37:54', '2015-10-16 09:37:54', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 09:37:54.474280"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: bc78f452-3c03-4e42-a55f-fea96c60baf1) to DelayedJob(default) at 2015-10-16 09:38:04 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 09:38:04.478703"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: bc78f452-3c03-4e42-a55f-fea96c60baf1\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 09:37:54.491566"], ["updated_at", "2015-10-16 09:37:54.491566"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bc78f452-3c03-4e42-a55f-fea96c60baf1] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 22.0ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f902c956-0f4f-4cfb-a567-db95a04e1056] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f902c956-0f4f-4cfb-a567-db95a04e1056]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f902c956-0f4f-4cfb-a567-db95a04e1056] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-10-16 09:37:54.747570"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f902c956-0f4f-4cfb-a567-db95a04e1056]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f902c956-0f4f-4cfb-a567-db95a04e1056] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 5.83ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ca3acf18-f3c3-4f69-94c6-f674c429eb67] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ca3acf18-f3c3-4f69-94c6-f674c429eb67] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.72ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 09:37:55.254665"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f]  (5.2ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 64e9279e-0f46-4125-bb47-1809d7e7ac0f) to DelayedJob(default) at 2015-10-16 09:38:05 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 09:38:05.263168"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 64e9279e-0f46-4125-bb47-1809d7e7ac0f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 09:37:55.278750"], ["updated_at", "2015-10-16 09:37:55.278750"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [64e9279e-0f46-4125-bb47-1809d7e7ac0f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 28.76ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 09:37:55', '2015-10-16 09:37:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 09:37:55', '2015-10-16 09:37:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 09:37:55.472076"], ["updated_at", "2015-10-16 09:37:55.472076"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 09:37:55.476853"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 09:37:55.481042"], ["updated_at", "2015-10-16 09:37:55.481042"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 09:37:55.483314"], ["updated_at", "2015-10-16 09:37:55.483314"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "859902bf5838c5369014bac033c0c0b8"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "859902bf5838c5369014bac033c0c0b8"], ["created_at", "2015-10-16 09:37:55.487517"], ["updated_at", "2015-10-16 09:37:55.487517"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8658b12bbe56fd42ad3a0b7815779750"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8658b12bbe56fd42ad3a0b7815779750"], ["created_at", "2015-10-16 09:37:55.490261"], ["updated_at", "2015-10-16 09:37:55.490261"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5f0e41df9884e17d48b0e5cf6c1d62e2"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5f0e41df9884e17d48b0e5cf6c1d62e2"], ["created_at", "2015-10-16 09:37:55.496416"], ["updated_at", "2015-10-16 09:37:55.496416"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bd471df0e026382d6551aad2d03fc0b0"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bd471df0e026382d6551aad2d03fc0b0"], ["created_at", "2015-10-16 09:37:55.499213"], ["updated_at", "2015-10-16 09:37:55.499213"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c13a32351a6023e23ff9c6670f7544b6"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c13a32351a6023e23ff9c6670f7544b6"], ["created_at", "2015-10-16 09:37:55.502932"], ["updated_at", "2015-10-16 09:37:55.502932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 09:37:55.509089"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 09:37:55.596822"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: b76ef333-bd4b-44be-bc8e-18e3c616285b) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: b76ef333-bd4b-44be-bc8e-18e3c616285b\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 09:37:55.629005"], ["created_at", "2015-10-16 09:37:55.629311"], ["updated_at", "2015-10-16 09:37:55.629311"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 09:37:55', '2015-10-16 09:37:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 09:37:55', '2015-10-16 09:37:55', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:55', '2015-10-16 09:37:55', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 09:37:55', '2015-10-16 09:37:55', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 09:37:55.805421"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 36ms (Views: 4.1ms | ActiveRecord: 0.7ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f470c69e6aab72f9697e2bf18ccc3d51"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "f470c69e6aab72f9697e2bf18ccc3d51"], ["created_at", "2015-10-16 09:37:55.872447"], ["updated_at", "2015-10-16 09:37:55.872447"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 09:37:55.878988"], ["updated_at", "2015-10-16 09:37:55.878988"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.4ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a1ef2ef1-2562-483a-b742-5e102773f1ea] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a1ef2ef1-2562-483a-b742-5e102773f1ea] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 73.29ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 09:37:57.559400"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 09:37:57.816482"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [956b6184-ee32-4675-9abe-fa74e6e364d9] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1465.53ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 09:37:58', '2015-10-16 09:37:58', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 09:37:58', '2015-10-16 09:37:58', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:58', '2015-10-16 09:37:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:58', '2015-10-16 09:37:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:58', '2015-10-16 09:37:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 09:37:58', '2015-10-16 09:37:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 09:37:58', '2015-10-16 09:37:58', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 09:37:58.036815"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 09:37:58.043461"], ["updated_at", "2015-10-16 09:37:58.043461"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 09:37:58.049569"], ["updated_at", "2015-10-16 09:37:58.049569"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 09:37:58.050797"], ["updated_at", "2015-10-16 09:37:58.050797"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 09:37:58.051886"], ["updated_at", "2015-10-16 09:37:58.051886"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 10:31:16', '2015-10-16 10:31:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 10:31:16', '2015-10-16 10:31:16', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:16', '2015-10-16 10:31:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:16', '2015-10-16 10:31:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:16', '2015-10-16 10:31:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:16', '2015-10-16 10:31:16', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 10:31:16', '2015-10-16 10:31:16', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9f002f96d63cd276fc403c8244ac17d0"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "9f002f96d63cd276fc403c8244ac17d0"], ["created_at", "2015-10-16 10:31:16.979058"], ["updated_at", "2015-10-16 10:31:16.979058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 41ms (Views: 1.9ms | ActiveRecord: 0.9ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 10:31:17.028239"], ["updated_at", "2015-10-16 10:31:17.028239"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 10:31:17.032879"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 10:31:17.037437"], ["updated_at", "2015-10-16 10:31:17.037437"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 10:31:17.039521"], ["updated_at", "2015-10-16 10:31:17.039521"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b98f806a-6216-43ae-a71f-f12fc17135e9] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b98f806a-6216-43ae-a71f-f12fc17135e9] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 74.74ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 10:31:17.790197"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 10:31:18.022607"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ad522f4f-147d-4eb4-9e78-dea85722a983] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 536.02ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 10:31:18', '2015-10-16 10:31:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 10:31:18', '2015-10-16 10:31:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:18', '2015-10-16 10:31:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:18', '2015-10-16 10:31:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:18', '2015-10-16 10:31:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:18', '2015-10-16 10:31:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 10:31:18', '2015-10-16 10:31:18', 948421225)  (1.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 10:31:18.253161"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (1.8ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 10:31:18.384934"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 6514a8d0-26d7-4904-9b9b-9242f44458f9) to DelayedJob(default) at 2015-10-16 10:31:28 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9] SQL (1.0ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 10:31:28.388972"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 6514a8d0-26d7-4904-9b9b-9242f44458f9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 10:31:18.401251"], ["updated_at", "2015-10-16 10:31:18.401251"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [6514a8d0-26d7-4904-9b9b-9242f44458f9] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 21.78ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ab082cf4-ba9d-454a-a95c-dea0d178a57f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ab082cf4-ba9d-454a-a95c-dea0d178a57f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ab082cf4-ba9d-454a-a95c-dea0d178a57f] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-10-16 10:31:18.652827"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ab082cf4-ba9d-454a-a95c-dea0d178a57f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [ab082cf4-ba9d-454a-a95c-dea0d178a57f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 6.12ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [dd62f9c4-307f-4567-a8d0-2372966a36f0] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [dd62f9c4-307f-4567-a8d0-2372966a36f0] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.48ms  (0.5ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 10:31:19.175345"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a]  (4.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 7c664aae-d5b0-4075-b281-0dd8ad7f315a) to DelayedJob(default) at 2015-10-16 10:31:29 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 10:31:29.183712"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 7c664aae-d5b0-4075-b281-0dd8ad7f315a\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 10:31:19.199106"], ["updated_at", "2015-10-16 10:31:19.199106"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7c664aae-d5b0-4075-b281-0dd8ad7f315a] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 28.31ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 10:31:19', '2015-10-16 10:31:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 10:31:19', '2015-10-16 10:31:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3e44fe60a30d567b6585ecfae976f32a"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3e44fe60a30d567b6585ecfae976f32a"], ["created_at", "2015-10-16 10:31:19.378023"], ["updated_at", "2015-10-16 10:31:19.378023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b3e3cb5414fdbc88ba8a45dc65c02c69"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b3e3cb5414fdbc88ba8a45dc65c02c69"], ["created_at", "2015-10-16 10:31:19.382866"], ["updated_at", "2015-10-16 10:31:19.382866"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cbacedef84270e8c664a16237f8972a3"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cbacedef84270e8c664a16237f8972a3"], ["created_at", "2015-10-16 10:31:19.391152"], ["updated_at", "2015-10-16 10:31:19.391152"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4fe35c29264c09c65b2772b837980c65"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4fe35c29264c09c65b2772b837980c65"], ["created_at", "2015-10-16 10:31:19.395258"], ["updated_at", "2015-10-16 10:31:19.395258"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bfa63d1de9d641126e50cf739b6c4f98"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bfa63d1de9d641126e50cf739b6c4f98"], ["created_at", "2015-10-16 10:31:19.399935"], ["updated_at", "2015-10-16 10:31:19.399935"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 10:31:19.406885"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 10:31:19.494667"], ["id", 335514824]]  (0.8ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 10:31:19', '2015-10-16 10:31:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 10:31:19', '2015-10-16 10:31:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:19', '2015-10-16 10:31:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 10:31:19', '2015-10-16 10:31:19', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 10:31:20.004054"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 10:31:20.009606"], ["updated_at", "2015-10-16 10:31:20.009606"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 10:31:20.015394"], ["updated_at", "2015-10-16 10:31:20.015394"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 10:31:20.017005"], ["updated_at", "2015-10-16 10:31:20.017005"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 10:31:20.018342"], ["updated_at", "2015-10-16 10:31:20.018342"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 19ms (Views: 5.2ms | ActiveRecord: 0.5ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fbb178026f64c6e43858dffc15cdfe65"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "fbb178026f64c6e43858dffc15cdfe65"], ["created_at", "2015-10-16 10:31:20.060262"], ["updated_at", "2015-10-16 10:31:20.060262"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.8ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 10:31:20.064419"], ["updated_at", "2015-10-16 10:31:20.064419"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 10:31:20.713321"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 10:31:22', '2015-10-16 10:31:22', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 10:31:22', '2015-10-16 10:31:22', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:22', '2015-10-16 10:31:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:22', '2015-10-16 10:31:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:22', '2015-10-16 10:31:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 10:31:22', '2015-10-16 10:31:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 10:31:22', '2015-10-16 10:31:22', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 10:31:22.571528"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 10:31:22.669437"], ["id", 335514824]]  (0.7ms) commit transaction Completed 500 Internal Server Error in 28ms (ActiveRecord: 1.4ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.6ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:33:15', '2015-10-16 11:33:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:33:15', '2015-10-16 11:33:15', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:33:15', '2015-10-16 11:33:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:33:15', '2015-10-16 11:33:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:33:15', '2015-10-16 11:33:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:33:15', '2015-10-16 11:33:15', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:33:15', '2015-10-16 11:33:15', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ec700c9e38bb9d8263ca53e5383914bd"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ec700c9e38bb9d8263ca53e5383914bd"], ["created_at", "2015-10-16 11:33:15.117591"], ["updated_at", "2015-10-16 11:33:15.117591"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "17f6000ef8d4c85fdf193dabcf774e27"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "17f6000ef8d4c85fdf193dabcf774e27"], ["created_at", "2015-10-16 11:33:15.121612"], ["updated_at", "2015-10-16 11:33:15.121612"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d9ab68fa9faebccab5b74b03bafaf631"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d9ab68fa9faebccab5b74b03bafaf631"], ["created_at", "2015-10-16 11:33:15.127501"], ["updated_at", "2015-10-16 11:33:15.127501"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "897080c5ec19a6057c6f8e0b65637019"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "897080c5ec19a6057c6f8e0b65637019"], ["created_at", "2015-10-16 11:33:15.130084"], ["updated_at", "2015-10-16 11:33:15.130084"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "698e7f4ef654be76bd716ef431be64b9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "698e7f4ef654be76bd716ef431be64b9"], ["created_at", "2015-10-16 11:33:15.133943"], ["updated_at", "2015-10-16 11:33:15.133943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:33:15.149102"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (1.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:33:15.270445"], ["id", 335514824]]  (1.2ms) commit transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:17', '2015-10-16 11:34:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:17', '2015-10-16 11:34:17', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:17', '2015-10-16 11:34:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:17', '2015-10-16 11:34:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:17', '2015-10-16 11:34:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:17', '2015-10-16 11:34:17', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:17', '2015-10-16 11:34:17', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (1.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:34:17.152901"], ["id", 335514824]]  (0.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:31', '2015-10-16 11:34:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:31', '2015-10-16 11:34:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:31', '2015-10-16 11:34:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:31', '2015-10-16 11:34:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:31', '2015-10-16 11:34:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:31', '2015-10-16 11:34:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:31', '2015-10-16 11:34:31', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:34:31.857502"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 0eae8eeb-932a-48ae-84b8-fc54f720c63e) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.8ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 0eae8eeb-932a-48ae-84b8-fc54f720c63e\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:34:31.885638"], ["created_at", "2015-10-16 11:34:31.885929"], ["updated_at", "2015-10-16 11:34:31.885929"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:38', '2015-10-16 11:34:38', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:38', '2015-10-16 11:34:38', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:38', '2015-10-16 11:34:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:38', '2015-10-16 11:34:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:38', '2015-10-16 11:34:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:38', '2015-10-16 11:34:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:38', '2015-10-16 11:34:38', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6c8fa88f4a0680f2aef54f7a70d66d96"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6c8fa88f4a0680f2aef54f7a70d66d96"], ["created_at", "2015-10-16 11:34:38.130458"], ["updated_at", "2015-10-16 11:34:38.130458"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fb451d024b9316d9c6b80821ca666820"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fb451d024b9316d9c6b80821ca666820"], ["created_at", "2015-10-16 11:34:38.133694"], ["updated_at", "2015-10-16 11:34:38.133694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6916f53bedbe1e566aa27b12a914415c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6916f53bedbe1e566aa27b12a914415c"], ["created_at", "2015-10-16 11:34:38.138220"], ["updated_at", "2015-10-16 11:34:38.138220"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e88ef5c9ad9ee21dc4f1c2d041005dc6"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e88ef5c9ad9ee21dc4f1c2d041005dc6"], ["created_at", "2015-10-16 11:34:38.140710"], ["updated_at", "2015-10-16 11:34:38.140710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "787081cc43ed96ea02b076f26b8ac824"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "787081cc43ed96ea02b076f26b8ac824"], ["created_at", "2015-10-16 11:34:38.144989"], ["updated_at", "2015-10-16 11:34:38.144989"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:34:38.162325"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:34:38.245265"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 43df9757-035e-40ef-a718-7cf7aee376fc) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 43df9757-035e-40ef-a718-7cf7aee376fc\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:34:38.271756"], ["created_at", "2015-10-16 11:34:38.272015"], ["updated_at", "2015-10-16 11:34:38.272015"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:45', '2015-10-16 11:34:45', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:45', '2015-10-16 11:34:45', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:45', '2015-10-16 11:34:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:45', '2015-10-16 11:34:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:45', '2015-10-16 11:34:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:45', '2015-10-16 11:34:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:45', '2015-10-16 11:34:45', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 13ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 36ms (Views: 4.0ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "724a8ef588391eb2afa4a458837c0a3e"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "724a8ef588391eb2afa4a458837c0a3e"], ["created_at", "2015-10-16 11:34:45.790823"], ["updated_at", "2015-10-16 11:34:45.790823"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 11:34:45.800707"], ["updated_at", "2015-10-16 11:34:45.800707"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "300332626154fca58dd0c6cbe3cc8916"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "300332626154fca58dd0c6cbe3cc8916"], ["created_at", "2015-10-16 11:34:45.827558"], ["updated_at", "2015-10-16 11:34:45.827558"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9e2fbdeae8fb27da2a246a4c212e2777"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9e2fbdeae8fb27da2a246a4c212e2777"], ["created_at", "2015-10-16 11:34:45.831095"], ["updated_at", "2015-10-16 11:34:45.831095"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c23f190d3782eaee31b46d4235e65d8d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c23f190d3782eaee31b46d4235e65d8d"], ["created_at", "2015-10-16 11:34:45.836483"], ["updated_at", "2015-10-16 11:34:45.836483"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "613c48cb08dbc857753ee5df335231a2"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "613c48cb08dbc857753ee5df335231a2"], ["created_at", "2015-10-16 11:34:45.839053"], ["updated_at", "2015-10-16 11:34:45.839053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "81ea8bd54c21e86b03c018b72c1e4698"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "81ea8bd54c21e86b03c018b72c1e4698"], ["created_at", "2015-10-16 11:34:45.843947"], ["updated_at", "2015-10-16 11:34:45.843947"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:34:45.856796"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:34:45.948701"], ["id", 335514824]]  (0.9ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: dfb4517a-296e-440e-839c-02df56f1acc3) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: dfb4517a-296e-440e-839c-02df56f1acc3\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:34:45.981449"], ["created_at", "2015-10-16 11:34:45.981769"], ["updated_at", "2015-10-16 11:34:45.981769"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:46', '2015-10-16 11:34:46', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:46', '2015-10-16 11:34:46', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:46', '2015-10-16 11:34:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:46', '2015-10-16 11:34:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:46', '2015-10-16 11:34:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:46', '2015-10-16 11:34:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:46', '2015-10-16 11:34:46', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:34:46.730567"], ["id", 1039265257]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 8d82cd77-502f-41fb-ae7b-961dfe6595bd) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 8d82cd77-502f-41fb-ae7b-961dfe6595bd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 11:34:46.767388"], ["created_at", "2015-10-16 11:34:46.767704"], ["updated_at", "2015-10-16 11:34:46.767704"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:48', '2015-10-16 11:34:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:48', '2015-10-16 11:34:48', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:48', '2015-10-16 11:34:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:48', '2015-10-16 11:34:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:48', '2015-10-16 11:34:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:48', '2015-10-16 11:34:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:48', '2015-10-16 11:34:48', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 11:34:48.434760"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 870ce632-451a-4535-b008-e1756fc1243a) to DelayedJob(default) at 2015-10-16 11:34:58 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 11:34:58.439445"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 870ce632-451a-4535-b008-e1756fc1243a\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 11:34:48.456988"], ["updated_at", "2015-10-16 11:34:48.456988"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a]  (1.1ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [870ce632-451a-4535-b008-e1756fc1243a] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 28.32ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [722dafb3-3c46-464e-ba55-8f8b644764d5] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [722dafb3-3c46-464e-ba55-8f8b644764d5]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [722dafb3-3c46-464e-ba55-8f8b644764d5] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-10-16 11:34:48.715950"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [722dafb3-3c46-464e-ba55-8f8b644764d5]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [722dafb3-3c46-464e-ba55-8f8b644764d5] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 7.3ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e5efdf72-2c08-4dea-9be7-c616babfaa1e] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [e5efdf72-2c08-4dea-9be7-c616babfaa1e] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.36ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 11:34:49.225828"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f]  (5.0ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 214de04b-7c45-44f8-888c-8cbe360ba34f) to DelayedJob(default) at 2015-10-16 11:34:59 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 11:34:59.233762"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 214de04b-7c45-44f8-888c-8cbe360ba34f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 11:34:49.248337"], ["updated_at", "2015-10-16 11:34:49.248337"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [214de04b-7c45-44f8-888c-8cbe360ba34f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 26.61ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:49', '2015-10-16 11:34:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:49', '2015-10-16 11:34:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 11:34:49.431952"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 11:34:49.443500"], ["updated_at", "2015-10-16 11:34:49.443500"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 11:34:49.447430"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 11:34:49.451164"], ["updated_at", "2015-10-16 11:34:49.451164"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:34:49.453763"], ["updated_at", "2015-10-16 11:34:49.453763"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:34:49.463412"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:34:49.557494"], ["id", 335514824]]  (1.0ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 86030c3e-39d9-4c17-9f6d-fb1e18d3e385) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 86030c3e-39d9-4c17-9f6d-fb1e18d3e385\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:34:49.591445"], ["created_at", "2015-10-16 11:34:49.591764"], ["updated_at", "2015-10-16 11:34:49.591764"]] [ActiveJob]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 45ms (Views: 2.7ms | ActiveRecord: 3.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:34:49', '2015-10-16 11:34:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:34:49', '2015-10-16 11:34:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:34:49', '2015-10-16 11:34:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:34:49', '2015-10-16 11:34:49', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 11:34:49.774795"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:34:49.779676"], ["updated_at", "2015-10-16 11:34:49.779676"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:34:49.785413"], ["updated_at", "2015-10-16 11:34:49.785413"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 11:34:49.786550"], ["updated_at", "2015-10-16 11:34:49.786550"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 11:34:49.787685"], ["updated_at", "2015-10-16 11:34:49.787685"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c045c1881a47a4e11bfac7ac94cf35d7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "c045c1881a47a4e11bfac7ac94cf35d7"], ["created_at", "2015-10-16 11:34:49.794334"], ["updated_at", "2015-10-16 11:34:49.794334"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7b83a3d8-30cb-40f0-bb21-6dee4159520d] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7b83a3d8-30cb-40f0-bb21-6dee4159520d] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 78.64ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 11:34:50.741230"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 11:34:51.069637"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [92977168-8a11-460b-ba2f-e5e17689a8fe] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 827.7ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:04', '2015-10-16 11:35:04', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:04', '2015-10-16 11:35:04', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:04', '2015-10-16 11:35:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:04', '2015-10-16 11:35:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:04', '2015-10-16 11:35:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:04', '2015-10-16 11:35:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:04', '2015-10-16 11:35:04', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [edb35de9-daae-43ac-8908-78a7df8bf39d] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [edb35de9-daae-43ac-8908-78a7df8bf39d] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 27.64ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 11:35:04.755386"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 11:35:05.051904"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e75ba484-be11-4310-a94f-d255270a667f] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 555.95ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:05', '2015-10-16 11:35:05', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:05', '2015-10-16 11:35:05', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 11:35:05.275837"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.0ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:35:05.288943"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:05.392061"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 15c5f5c0-f10a-437a-b0a7-7746560d088c) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 15c5f5c0-f10a-437a-b0a7-7746560d088c\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:35:05.419033"], ["created_at", "2015-10-16 11:35:05.419635"], ["updated_at", "2015-10-16 11:35:05.419635"]] [ActiveJob]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 41ms (Views: 2.8ms | ActiveRecord: 3.6ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:05', '2015-10-16 11:35:05', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:05', '2015-10-16 11:35:05', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:05', '2015-10-16 11:35:05', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:05', '2015-10-16 11:35:05', 948421225)  (1.0ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 24ms (Views: 3.2ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "801e1e932ad53044d4e8f0a7fb4355c5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "801e1e932ad53044d4e8f0a7fb4355c5"], ["created_at", "2015-10-16 11:35:05.660446"], ["updated_at", "2015-10-16 11:35:05.660446"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 11:35:05.668552"], ["updated_at", "2015-10-16 11:35:05.668552"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 11:35:05.795490"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: bb92a758-e387-42d3-9448-9595420728e5) to DelayedJob(default) at 2015-10-16 11:35:15 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 11:35:15.799493"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: bb92a758-e387-42d3-9448-9595420728e5\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 11:35:05.812848"], ["updated_at", "2015-10-16 11:35:05.812848"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5]  (1.2ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [bb92a758-e387-42d3-9448-9595420728e5] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 23.13ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [70497c84-a8fd-4af2-b72a-6783ad0740cb] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [70497c84-a8fd-4af2-b72a-6783ad0740cb]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [70497c84-a8fd-4af2-b72a-6783ad0740cb] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-10-16 11:35:06.069393"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [70497c84-a8fd-4af2-b72a-6783ad0740cb]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [70497c84-a8fd-4af2-b72a-6783ad0740cb] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 5.85ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [2b6f6958-79d3-4aed-8fbe-4dd6d5fa3ffd] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [2b6f6958-79d3-4aed-8fbe-4dd6d5fa3ffd] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.3ms  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 11:35:06.582398"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d]  (5.3ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: a9126eb2-dcaf-4013-bb0d-6561794b4e1d) to DelayedJob(default) at 2015-10-16 11:35:16 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 11:35:16.591122"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: a9126eb2-dcaf-4013-bb0d-6561794b4e1d\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 11:35:06.608857"], ["updated_at", "2015-10-16 11:35:06.608857"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [a9126eb2-dcaf-4013-bb0d-6561794b4e1d] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 30.8ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:06', '2015-10-16 11:35:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:06', '2015-10-16 11:35:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:06', '2015-10-16 11:35:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:06', '2015-10-16 11:35:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:06', '2015-10-16 11:35:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:06', '2015-10-16 11:35:06', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:06', '2015-10-16 11:35:06', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 11:35:06.797639"], ["updated_at", "2015-10-16 11:35:06.797639"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 11:35:06.803043"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 11:35:06.814961"], ["updated_at", "2015-10-16 11:35:06.814961"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:35:06.817408"], ["updated_at", "2015-10-16 11:35:06.817408"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:07.393125"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: b0cd3f19-5217-4846-9289-c4d3b1c626bd) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: b0cd3f19-5217-4846-9289-c4d3b1c626bd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 11:35:07.426390"], ["created_at", "2015-10-16 11:35:07.426711"], ["updated_at", "2015-10-16 11:35:07.426711"]] [ActiveJob]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.2ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 44f82bf2-8220-4a8e-a0b5-b04d75818fe3) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 44f82bf2-8220-4a8e-a0b5-b04d75818fe3\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 11:35:07.703212"], ["created_at", "2015-10-16 11:35:07.703576"], ["updated_at", "2015-10-16 11:35:07.703576"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:08', '2015-10-16 11:35:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:08', '2015-10-16 11:35:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 579229346) Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:08', '2015-10-16 11:35:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:08', '2015-10-16 11:35:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:08', '2015-10-16 11:35:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:08', '2015-10-16 11:35:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:08', '2015-10-16 11:35:08', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a0b092c777828bb402fb7beab335f446"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a0b092c777828bb402fb7beab335f446"], ["created_at", "2015-10-16 11:35:08.779623"], ["updated_at", "2015-10-16 11:35:08.779623"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a27f09c5abfaf04d8628270827f54a99"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a27f09c5abfaf04d8628270827f54a99"], ["created_at", "2015-10-16 11:35:08.783098"], ["updated_at", "2015-10-16 11:35:08.783098"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5c055043dd225a824af859394f67f957"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5c055043dd225a824af859394f67f957"], ["created_at", "2015-10-16 11:35:08.789058"], ["updated_at", "2015-10-16 11:35:08.789058"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e621758fc7072ec957dd9d9907c1b7c4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e621758fc7072ec957dd9d9907c1b7c4"], ["created_at", "2015-10-16 11:35:08.791916"], ["updated_at", "2015-10-16 11:35:08.791916"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4ca610c35d3bc6d63ca48bd5b339a0b0"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4ca610c35d3bc6d63ca48bd5b339a0b0"], ["created_at", "2015-10-16 11:35:08.795949"], ["updated_at", "2015-10-16 11:35:08.795949"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:35:08.804119"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:08.896627"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 1088faf2-f78e-4696-b50f-633ca6fbd596) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 1088faf2-f78e-4696-b50f-633ca6fbd596\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:35:08.934131"], ["created_at", "2015-10-16 11:35:08.934458"], ["updated_at", "2015-10-16 11:35:08.934458"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:09', '2015-10-16 11:35:09', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:09', '2015-10-16 11:35:09', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:09', '2015-10-16 11:35:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:09', '2015-10-16 11:35:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:09', '2015-10-16 11:35:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:09', '2015-10-16 11:35:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:09', '2015-10-16 11:35:09', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 11:35:09.117470"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:35:09.122648"], ["updated_at", "2015-10-16 11:35:09.122648"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:35:09.128212"], ["updated_at", "2015-10-16 11:35:09.128212"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 11:35:09.129434"], ["updated_at", "2015-10-16 11:35:09.129434"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 11:35:09.130802"], ["updated_at", "2015-10-16 11:35:09.130802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b2b7ef36bbd12f75a003a43d83fbda47"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "b2b7ef36bbd12f75a003a43d83fbda47"], ["created_at", "2015-10-16 11:35:09.162960"], ["updated_at", "2015-10-16 11:35:09.162960"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.1ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:23', '2015-10-16 11:35:23', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:23', '2015-10-16 11:35:23', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:23', '2015-10-16 11:35:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:23', '2015-10-16 11:35:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:23', '2015-10-16 11:35:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:23', '2015-10-16 11:35:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:23', '2015-10-16 11:35:23', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_processing ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 11:35:23.397849"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c32c7ed5-6b42-4356-a5f2-7b892360cb83) to DelayedJob(default) at 2015-10-16 11:35:33 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 11:35:33.402817"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c32c7ed5-6b42-4356-a5f2-7b892360cb83\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 11:35:23.415855"], ["updated_at", "2015-10-16 11:35:23.415855"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [c32c7ed5-6b42-4356-a5f2-7b892360cb83] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 24.92ms  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_success -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f534efd6-fe75-4092-b510-bb6d9e704c10] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f534efd6-fe75-4092-b510-bb6d9e704c10]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f534efd6-fe75-4092-b510-bb6d9e704c10] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 800], ["height", 600], ["duration", 15], ["updated_at", "2015-10-16 11:35:23.667550"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f534efd6-fe75-4092-b510-bb6d9e704c10]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f534efd6-fe75-4092-b510-bb6d9e704c10] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 8.66ms  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.6ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_unknown -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5a439e9-84fe-48f0-a498-ad1e8e7b246a] Performing Fogged::Resources::ZencoderPollJob from Inline(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [f5a439e9-84fe-48f0-a498-ad1e8e7b246a] Performed Fogged::Resources::ZencoderPollJob from Inline(default) in 0.33ms  (0.4ms) begin transaction -------------------------------------------------------------------------------- Fogged::Resources::ZencoderPollJobTest: test_should_poll_job_with_status_waiting -------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f] Performing Fogged::Resources::ZencoderPollJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 55], ["updated_at", "2015-10-16 11:35:24.189889"], ["id", 538821867]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f]  (4.9ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 7d784bb9-dc8e-41a9-b100-36fc92ce6e2f) to DelayedJob(default) at 2015-10-16 11:35:34 UTC with arguments: gid://dummy/Fogged::Resource/538821867 [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "run_at", "handler", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["run_at", "2015-10-16 11:35:34.200518"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 7d784bb9-dc8e-41a9-b100-36fc92ce6e2f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/538821867\n"], ["created_at", "2015-10-16 11:35:24.211371"], ["updated_at", "2015-10-16 11:35:24.211371"]] [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::ZencoderPollJob] [7d784bb9-dc8e-41a9-b100-36fc92ce6e2f] Performed Fogged::Resources::ZencoderPollJob from DelayedJob(default) in 28.86ms  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 538821867]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:24', '2015-10-16 11:35:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:24', '2015-10-16 11:35:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9d0357cb4b697a76315bbe5484897cd0"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9d0357cb4b697a76315bbe5484897cd0"], ["created_at", "2015-10-16 11:35:24.392633"], ["updated_at", "2015-10-16 11:35:24.392633"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e1217147b9d6ae5b27bcbf638af3061b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e1217147b9d6ae5b27bcbf638af3061b"], ["created_at", "2015-10-16 11:35:24.397508"], ["updated_at", "2015-10-16 11:35:24.397508"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ec077b6f9ec1a46711c59c2e396afe8c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ec077b6f9ec1a46711c59c2e396afe8c"], ["created_at", "2015-10-16 11:35:24.403857"], ["updated_at", "2015-10-16 11:35:24.403857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2c312d2c54c7e93a23b8ce8fb0c8eaf3"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2c312d2c54c7e93a23b8ce8fb0c8eaf3"], ["created_at", "2015-10-16 11:35:24.407299"], ["updated_at", "2015-10-16 11:35:24.407299"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "86d3ef5f01783e6a156bbdc388c02845"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "86d3ef5f01783e6a156bbdc388c02845"], ["created_at", "2015-10-16 11:35:24.412318"], ["updated_at", "2015-10-16 11:35:24.412318"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:35:24.426602"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:24.508659"], ["id", 335514824]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 0ed7aa47-eee3-4748-a3d8-a894996f8714) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 0ed7aa47-eee3-4748-a3d8-a894996f8714\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:35:24.536219"], ["created_at", "2015-10-16 11:35:24.536483"], ["updated_at", "2015-10-16 11:35:24.536483"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:24', '2015-10-16 11:35:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:24', '2015-10-16 11:35:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:24', '2015-10-16 11:35:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:24', '2015-10-16 11:35:24', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [34e1816d-21c6-4a10-8eda-461233567cd0] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [34e1816d-21c6-4a10-8eda-461233567cd0] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 25.5ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71]  (1.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 11:35:25.294766"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71]  (1.2ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 11:35:25.548750"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6571d850-ce90-4a20-956a-85e7446eab71] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 504.42ms Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:25', '2015-10-16 11:35:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:25', '2015-10-16 11:35:25', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:25', '2015-10-16 11:35:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:25', '2015-10-16 11:35:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:25', '2015-10-16 11:35:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:25', '2015-10-16 11:35:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:25', '2015-10-16 11:35:25', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 11:35:25.753024"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 11:35:25.789698"], ["updated_at", "2015-10-16 11:35:25.789698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 11:35:25.794616"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 11:35:25.799524"], ["updated_at", "2015-10-16 11:35:25.799524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:35:25.802292"], ["updated_at", "2015-10-16 11:35:25.802292"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "175eb085e0cb0e16e4242e058ba170db"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "175eb085e0cb0e16e4242e058ba170db"], ["created_at", "2015-10-16 11:35:25.809175"], ["updated_at", "2015-10-16 11:35:25.809175"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 22ms (Views: 3.0ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "aafd544a5fbcc69bcce8bf046771d251"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "aafd544a5fbcc69bcce8bf046771d251"], ["created_at", "2015-10-16 11:35:25.875610"], ["updated_at", "2015-10-16 11:35:25.875610"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 11:35:25.881706"], ["updated_at", "2015-10-16 11:35:25.881706"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 26aa9c14-1e9a-4e4d-97c1-b34a2ace91a4) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 26aa9c14-1e9a-4e4d-97c1-b34a2ace91a4\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 11:35:26.015137"], ["created_at", "2015-10-16 11:35:26.015639"], ["updated_at", "2015-10-16 11:35:26.015639"]] [ActiveJob]  (1.0ms) commit transaction  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:26.021111"], ["id", 14225656]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:26.246891"], ["id", 1039265257]]  (0.8ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: bcc345bf-9a21-4091-80da-0305827075e3) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: bcc345bf-9a21-4091-80da-0305827075e3\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 11:35:26.280386"], ["created_at", "2015-10-16 11:35:26.280777"], ["updated_at", "2015-10-16 11:35:26.280777"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: c58d34bd-4ac0-4c0c-a4ff-479e889c74c7) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/1039265257 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (1.0ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: c58d34bd-4ac0-4c0c-a4ff-479e889c74c7\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/1039265257\n"], ["run_at", "2015-10-16 11:35:26.542198"], ["created_at", "2015-10-16 11:35:26.542541"], ["updated_at", "2015-10-16 11:35:26.542541"]] [ActiveJob]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:27', '2015-10-16 11:35:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:27', '2015-10-16 11:35:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 11:35:27.536327"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:35:27.542134"], ["updated_at", "2015-10-16 11:35:27.542134"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 11:35:27.549737"], ["updated_at", "2015-10-16 11:35:27.549737"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 11:35:27.551192"], ["updated_at", "2015-10-16 11:35:27.551192"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 11:35:27.552805"], ["updated_at", "2015-10-16 11:35:27.552805"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 11:35:27.560954"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 11:35:27.650457"], ["id", 335514824]]  (0.7ms) commit transaction [ActiveJob] Enqueued Fogged::Resources::ZencoderPollJob (Job ID: 8d13e9d5-3e61-4b82-8d02-6bf25c1501d2) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/335514824 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::ZencoderPollJob\n job_id: 8d13e9d5-3e61-4b82-8d02-6bf25c1501d2\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/335514824\n"], ["run_at", "2015-10-16 11:35:27.681679"], ["created_at", "2015-10-16 11:35:27.682023"], ["updated_at", "2015-10-16 11:35:27.682023"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 42ms (Views: 2.7ms | ActiveRecord: 3.0ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 11:35:27', '2015-10-16 11:35:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 11:35:27', '2015-10-16 11:35:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 11:35:27', '2015-10-16 11:35:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 11:35:27', '2015-10-16 11:35:27', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:53:55', '2015-10-16 12:53:55', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:53:55', '2015-10-16 12:53:55', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:55', '2015-10-16 12:53:55', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:55', '2015-10-16 12:53:55', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:55', '2015-10-16 12:53:55', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:55', '2015-10-16 12:53:55', 779853880, 245026679, 431685987) Fixture Delete (0.6ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:53:55', '2015-10-16 12:53:55', 948421225)  (1.2ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "263d868d8ea951cc307180e9096c56bd"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "263d868d8ea951cc307180e9096c56bd"], ["created_at", "2015-10-16 12:53:55.970051"], ["updated_at", "2015-10-16 12:53:55.970051"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 35ms (Views: 2.7ms | ActiveRecord: 0.6ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b07863e7-bc8f-40e2-b487-2d86b0fdcbae] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b07863e7-bc8f-40e2-b487-2d86b0fdcbae] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 65.46ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 12:53:56.988205"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 12:53:57.227887"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ca956417-5ff3-4d19-b554-cb542faaeaf6] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 775.74ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:53:57', '2015-10-16 12:53:57', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:53:57', '2015-10-16 12:53:57', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:57', '2015-10-16 12:53:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:57', '2015-10-16 12:53:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:57', '2015-10-16 12:53:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:57', '2015-10-16 12:53:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:53:57', '2015-10-16 12:53:57', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 12:53:57.484072"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 12:53:57.491284"], ["updated_at", "2015-10-16 12:53:57.491284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 12:53:57.498359"], ["updated_at", "2015-10-16 12:53:57.498359"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 12:53:57.499951"], ["updated_at", "2015-10-16 12:53:57.499951"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 12:53:57.501438"], ["updated_at", "2015-10-16 12:53:57.501438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 0673399f-e328-4846-b177-287f5bb7d24f) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.8ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 0673399f-e328-4846-b177-287f5bb7d24f\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 12:53:57.652053"], ["created_at", "2015-10-16 12:53:57.652654"], ["updated_at", "2015-10-16 12:53:57.652654"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 12:53:57.657235"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:53:59', '2015-10-16 12:53:59', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:53:59', '2015-10-16 12:53:59', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:59', '2015-10-16 12:53:59', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:59', '2015-10-16 12:53:59', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:59', '2015-10-16 12:53:59', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:53:59', '2015-10-16 12:53:59', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:53:59', '2015-10-16 12:53:59', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 12:53:59.783574"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 12:53:59.793431"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.1ms)  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:54:00', '2015-10-16 12:54:00', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:54:00', '2015-10-16 12:54:00', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:54:00', '2015-10-16 12:54:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:54:00', '2015-10-16 12:54:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:54:00', '2015-10-16 12:54:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:54:00', '2015-10-16 12:54:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:54:00', '2015-10-16 12:54:00', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 12:54:00.297665"], ["updated_at", "2015-10-16 12:54:00.297665"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 12:54:00.302610"], ["id", 701625837]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 12:54:00.310334"], ["updated_at", "2015-10-16 12:54:00.310334"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 12:54:00.312905"], ["updated_at", "2015-10-16 12:54:00.312905"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 17ms (Views: 3.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "97fbc178d97b250985cef38ff00f390d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "97fbc178d97b250985cef38ff00f390d"], ["created_at", "2015-10-16 12:54:00.356825"], ["updated_at", "2015-10-16 12:54:00.356825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 12:54:00.360007"], ["updated_at", "2015-10-16 12:54:00.360007"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cb01333ad19f73c9ed71a4dd2a485534"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cb01333ad19f73c9ed71a4dd2a485534"], ["created_at", "2015-10-16 12:54:00.389286"], ["updated_at", "2015-10-16 12:54:00.389286"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6e4339cf5dbe5a7e6ffe18d9ff45140b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6e4339cf5dbe5a7e6ffe18d9ff45140b"], ["created_at", "2015-10-16 12:54:00.392150"], ["updated_at", "2015-10-16 12:54:00.392150"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6d3866bad3c51a0a96a3bb88ffd0c6cb"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6d3866bad3c51a0a96a3bb88ffd0c6cb"], ["created_at", "2015-10-16 12:54:00.396692"], ["updated_at", "2015-10-16 12:54:00.396692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "df7cb97a4a2b07ccdfcd23562d8bd16d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "df7cb97a4a2b07ccdfcd23562d8bd16d"], ["created_at", "2015-10-16 12:54:00.399232"], ["updated_at", "2015-10-16 12:54:00.399232"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4a03c2c10bd062bad47f679c20408b82"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4a03c2c10bd062bad47f679c20408b82"], ["created_at", "2015-10-16 12:54:00.403116"], ["updated_at", "2015-10-16 12:54:00.403116"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 12:54:00.409713"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:55:16', '2015-10-16 12:55:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:55:16', '2015-10-16 12:55:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 12:55:16.300377"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 26ms (Views: 1.7ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 12:55:16.412012"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 13ms (Views: 2.9ms | ActiveRecord: 1.7ms)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 1039265257) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:55:16', '2015-10-16 12:55:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:55:16', '2015-10-16 12:55:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:16', '2015-10-16 12:55:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:55:16', '2015-10-16 12:55:16', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 9b79f4de-06af-4803-82d4-029a7cbfa306) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 9b79f4de-06af-4803-82d4-029a7cbfa306\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 12:55:16.921600"], ["created_at", "2015-10-16 12:55:16.922037"], ["updated_at", "2015-10-16 12:55:16.922037"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 12:55:16.926226"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 12:55:17.169979"], ["id", 1039265257]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction  (0.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:55:18', '2015-10-16 12:55:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:55:18', '2015-10-16 12:55:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:18', '2015-10-16 12:55:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:18', '2015-10-16 12:55:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:18', '2015-10-16 12:55:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:18', '2015-10-16 12:55:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:55:18', '2015-10-16 12:55:18', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 3.8ms | ActiveRecord: 0.4ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3eb0deb40c51fcd6c090c24082e72d03"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "3eb0deb40c51fcd6c090c24082e72d03"], ["created_at", "2015-10-16 12:55:19.012961"], ["updated_at", "2015-10-16 12:55:19.012961"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 12:55:19.021048"], ["updated_at", "2015-10-16 12:55:19.021048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 12:55:19.061768"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 12:55:19.071351"], ["updated_at", "2015-10-16 12:55:19.071351"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 12:55:19.077238"], ["updated_at", "2015-10-16 12:55:19.077238"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 12:55:19.078548"], ["updated_at", "2015-10-16 12:55:19.078548"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 12:55:19.080082"], ["updated_at", "2015-10-16 12:55:19.080082"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [91861775-ecd3-47b9-bb52-3db0f08ccc77] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [91861775-ecd3-47b9-bb52-3db0f08ccc77] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 33.43ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 12:55:20.149520"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 12:55:20.431992"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a86efd9b-2ca2-447b-8306-a678b3ba22fe] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 963.24ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:55:20', '2015-10-16 12:55:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:55:20', '2015-10-16 12:55:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:20', '2015-10-16 12:55:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:20', '2015-10-16 12:55:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:20', '2015-10-16 12:55:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:20', '2015-10-16 12:55:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:55:20', '2015-10-16 12:55:20', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 12:55:20.661985"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 12:55:20.675920"], ["updated_at", "2015-10-16 12:55:20.675920"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 12:55:20.680411"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 12:55:20.683953"], ["updated_at", "2015-10-16 12:55:20.683953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 12:55:20.686131"], ["updated_at", "2015-10-16 12:55:20.686131"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b714627fe2405b3a4e83dcc21cd599e1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b714627fe2405b3a4e83dcc21cd599e1"], ["created_at", "2015-10-16 12:55:20.689555"], ["updated_at", "2015-10-16 12:55:20.689555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "10ecce2b18c4454e3cd69324e70d2e72"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "10ecce2b18c4454e3cd69324e70d2e72"], ["created_at", "2015-10-16 12:55:20.692381"], ["updated_at", "2015-10-16 12:55:20.692381"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2db65786be37c7f700e41f1213e9f88b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2db65786be37c7f700e41f1213e9f88b"], ["created_at", "2015-10-16 12:55:20.697652"], ["updated_at", "2015-10-16 12:55:20.697652"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "97dae7544c8e91f9313feda85c57bf65"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "97dae7544c8e91f9313feda85c57bf65"], ["created_at", "2015-10-16 12:55:20.700561"], ["updated_at", "2015-10-16 12:55:20.700561"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "89ce656d1b867ba59724f68127825ee5"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "89ce656d1b867ba59724f68127825ee5"], ["created_at", "2015-10-16 12:55:20.703722"], ["updated_at", "2015-10-16 12:55:20.703722"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 12:55:20.711004"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 12:55:20.801268"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:55:21', '2015-10-16 12:55:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:55:21', '2015-10-16 12:55:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:21', '2015-10-16 12:55:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:21', '2015-10-16 12:55:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:21', '2015-10-16 12:55:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:55:21', '2015-10-16 12:55:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:55:21', '2015-10-16 12:55:21', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e8d00600175995550722da0bfa41cb53"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "e8d00600175995550722da0bfa41cb53"], ["created_at", "2015-10-16 12:55:21.193260"], ["updated_at", "2015-10-16 12:55:21.193260"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.6ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:56:10', '2015-10-16 12:56:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:56:10', '2015-10-16 12:56:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:56:10', '2015-10-16 12:56:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:56:10', '2015-10-16 12:56:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:56:10', '2015-10-16 12:56:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:56:10', '2015-10-16 12:56:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:56:10', '2015-10-16 12:56:10', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1f33410d02bd06abac392172e386a533"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1f33410d02bd06abac392172e386a533"], ["created_at", "2015-10-16 12:56:10.116576"], ["updated_at", "2015-10-16 12:56:10.116576"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "931c2a4f1d7364d29f9172db94f973cb"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "931c2a4f1d7364d29f9172db94f973cb"], ["created_at", "2015-10-16 12:56:10.119839"], ["updated_at", "2015-10-16 12:56:10.119839"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "acb3e4af77a53b2b9b3ed46ca4a9aac0"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "acb3e4af77a53b2b9b3ed46ca4a9aac0"], ["created_at", "2015-10-16 12:56:10.124825"], ["updated_at", "2015-10-16 12:56:10.124825"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4fd7a6915b0038edfcb90f5938b3ff76"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4fd7a6915b0038edfcb90f5938b3ff76"], ["created_at", "2015-10-16 12:56:10.128415"], ["updated_at", "2015-10-16 12:56:10.128415"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c777ec788fd0a067f90fe657efaf4ead"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c777ec788fd0a067f90fe657efaf4ead"], ["created_at", "2015-10-16 12:56:10.132585"], ["updated_at", "2015-10-16 12:56:10.132585"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 12:56:10.144720"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 12:56:10.233986"], ["id", 335514824]]  (1.0ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 12:57:15', '2015-10-16 12:57:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 12:57:15', '2015-10-16 12:57:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:57:15', '2015-10-16 12:57:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:57:15', '2015-10-16 12:57:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:57:15', '2015-10-16 12:57:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 12:57:15', '2015-10-16 12:57:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 12:57:15', '2015-10-16 12:57:15', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d601978e02477fd1d6d7811c4a89aa0c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d601978e02477fd1d6d7811c4a89aa0c"], ["created_at", "2015-10-16 12:57:15.229238"], ["updated_at", "2015-10-16 12:57:15.229238"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c5f385cf378653c6c0e4faaebbc869d9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c5f385cf378653c6c0e4faaebbc869d9"], ["created_at", "2015-10-16 12:57:15.232702"], ["updated_at", "2015-10-16 12:57:15.232702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b666dfe56b6de54a5591ab745327fd0f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b666dfe56b6de54a5591ab745327fd0f"], ["created_at", "2015-10-16 12:57:15.237465"], ["updated_at", "2015-10-16 12:57:15.237465"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7f6ed0afffa120c05de4832258226821"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7f6ed0afffa120c05de4832258226821"], ["created_at", "2015-10-16 12:57:15.240046"], ["updated_at", "2015-10-16 12:57:15.240046"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8658ebabd9f166ba3ead1d1a1e26df62"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8658ebabd9f166ba3ead1d1a1e26df62"], ["created_at", "2015-10-16 12:57:15.243932"], ["updated_at", "2015-10-16 12:57:15.243932"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 12:57:15.255674"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 12:57:15.341900"], ["id", 335514824]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:00:01', '2015-10-16 13:00:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:00:01', '2015-10-16 13:00:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:01', '2015-10-16 13:00:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:01', '2015-10-16 13:00:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:01', '2015-10-16 13:00:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:01', '2015-10-16 13:00:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:00:01', '2015-10-16 13:00:01', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:00:01.330798"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:00:01.418074"], ["id", 335514824]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 11ms (Views: 2.9ms | ActiveRecord: 1.5ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:00:20', '2015-10-16 13:00:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:00:20', '2015-10-16 13:00:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:20', '2015-10-16 13:00:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:20', '2015-10-16 13:00:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:20', '2015-10-16 13:00:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:00:20', '2015-10-16 13:00:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:00:20', '2015-10-16 13:00:20', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:00:20.793671"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 1.4ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:00:20.886604"], ["id", 335514824]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 16ms (Views: 8.9ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:04:22', '2015-10-16 13:04:22', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:04:22', '2015-10-16 13:04:22', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:22', '2015-10-16 13:04:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:22', '2015-10-16 13:04:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:22', '2015-10-16 13:04:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:22', '2015-10-16 13:04:22', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:04:22', '2015-10-16 13:04:22', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.4ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: e0938506-e466-44c1-8ba0-b2d5610eee2d) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.0ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: e0938506-e466-44c1-8ba0-b2d5610eee2d\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 13:04:22.665915"], ["created_at", "2015-10-16 13:04:22.666579"], ["updated_at", "2015-10-16 13:04:22.666579"]] [ActiveJob]  (1.5ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 13:04:22.673365"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:04:22.944383"], ["id", 1039265257]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction  (0.1ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:04:24', '2015-10-16 13:04:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:04:24', '2015-10-16 13:04:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:24', '2015-10-16 13:04:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:24', '2015-10-16 13:04:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:24', '2015-10-16 13:04:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:24', '2015-10-16 13:04:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:04:24', '2015-10-16 13:04:24', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b5b4df3afcde0de8f37e0ff0c82ded0d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b5b4df3afcde0de8f37e0ff0c82ded0d"], ["created_at", "2015-10-16 13:04:24.777179"], ["updated_at", "2015-10-16 13:04:24.777179"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a6e4a9362d27e5584efb69392cc808d1"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a6e4a9362d27e5584efb69392cc808d1"], ["created_at", "2015-10-16 13:04:24.780973"], ["updated_at", "2015-10-16 13:04:24.780973"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c4183b35deadd1b8924a14cab75fa99c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c4183b35deadd1b8924a14cab75fa99c"], ["created_at", "2015-10-16 13:04:24.789815"], ["updated_at", "2015-10-16 13:04:24.789815"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8a81f11a21610a5d35347fcf342384e9"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8a81f11a21610a5d35347fcf342384e9"], ["created_at", "2015-10-16 13:04:24.792986"], ["updated_at", "2015-10-16 13:04:24.792986"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "893500f76fcf82cdaa3fda97e8ef4eae"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "893500f76fcf82cdaa3fda97e8ef4eae"], ["created_at", "2015-10-16 13:04:24.797728"], ["updated_at", "2015-10-16 13:04:24.797728"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:04:24.814572"], ["id", 785871319]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:04:24.907189"], ["id", 335514824]]  (1.3ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:04:25', '2015-10-16 13:04:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:04:25', '2015-10-16 13:04:25', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 13:04:25.099367"], ["updated_at", "2015-10-16 13:04:25.099367"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 13:04:25.104066"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 13:04:25.108003"], ["updated_at", "2015-10-16 13:04:25.108003"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:04:25.110802"], ["updated_at", "2015-10-16 13:04:25.110802"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:04:25.117310"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:04:25.216168"], ["id", 335514824]]  (1.2ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 18ms (Views: 3.5ms | ActiveRecord: 2.5ms) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:04:25', '2015-10-16 13:04:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:04:25', '2015-10-16 13:04:25', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:25', '2015-10-16 13:04:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:04:25', '2015-10-16 13:04:25', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [cedb4329-e770-4f74-ac75-1d1a91f24212] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [cedb4329-e770-4f74-ac75-1d1a91f24212] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 54.82ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 13:04:26.304502"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 13:04:26.543995"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46aa2b7d-ca8f-4dd7-9a86-72da89089714] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 729.82ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:04:26', '2015-10-16 13:04:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:04:26', '2015-10-16 13:04:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:26', '2015-10-16 13:04:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:26', '2015-10-16 13:04:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:26', '2015-10-16 13:04:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:04:26', '2015-10-16 13:04:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:04:26', '2015-10-16 13:04:26', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 35ms (Views: 3.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "11f751a52b1a7a8d7eb1d7ec0f490eb7"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "11f751a52b1a7a8d7eb1d7ec0f490eb7"], ["created_at", "2015-10-16 13:04:26.799408"], ["updated_at", "2015-10-16 13:04:26.799408"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 13:04:26.806733"], ["updated_at", "2015-10-16 13:04:26.806733"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (1.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.3ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 13:04:26.861039"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 13:04:26.876814"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:04:26.881388"], ["updated_at", "2015-10-16 13:04:26.881388"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:04:26.888508"], ["updated_at", "2015-10-16 13:04:26.888508"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 13:04:26.890361"], ["updated_at", "2015-10-16 13:04:26.890361"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 13:04:26.892720"], ["updated_at", "2015-10-16 13:04:26.892720"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0cba751a273cfdd6d814bea264e842e3"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "0cba751a273cfdd6d814bea264e842e3"], ["created_at", "2015-10-16 13:04:26.906096"], ["updated_at", "2015-10-16 13:04:26.906096"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:08:10', '2015-10-16 13:08:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:08:10', '2015-10-16 13:08:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:08:10', '2015-10-16 13:08:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:08:10', '2015-10-16 13:08:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:08:10', '2015-10-16 13:08:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:08:10', '2015-10-16 13:08:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:08:10', '2015-10-16 13:08:10', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 9f9d4c43-f1e7-4d92-a947-0e209e314fd9) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 9f9d4c43-f1e7-4d92-a947-0e209e314fd9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 13:08:10.322097"], ["created_at", "2015-10-16 13:08:10.322535"], ["updated_at", "2015-10-16 13:08:10.322535"]] [ActiveJob]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 13:08:10.326753"], ["id", 14225656]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:08:10.575955"], ["id", 1039265257]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) begin transaction  (0.3ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:10:52', '2015-10-16 13:10:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:10:52', '2015-10-16 13:10:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:10:52', '2015-10-16 13:10:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:10:52', '2015-10-16 13:10:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:10:52', '2015-10-16 13:10:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:10:52', '2015-10-16 13:10:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:10:52', '2015-10-16 13:10:52', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:10:53.305642"], ["id", 1039265257]]  (0.6ms) commit transaction  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.8ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:11:37', '2015-10-16 13:11:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:11:37', '2015-10-16 13:11:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:11:37', '2015-10-16 13:11:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:11:37', '2015-10-16 13:11:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:11:37', '2015-10-16 13:11:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:11:37', '2015-10-16 13:11:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:11:37', '2015-10-16 13:11:37', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 93843ddc-824b-49d9-ae6b-31b17c9124bb) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 93843ddc-824b-49d9-ae6b-31b17c9124bb\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 13:11:37.757813"], ["created_at", "2015-10-16 13:11:37.758227"], ["updated_at", "2015-10-16 13:11:37.758227"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 13:11:37.762087"], ["id", 14225656]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:12:44', '2015-10-16 13:12:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:12:44', '2015-10-16 13:12:44', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:12:44', '2015-10-16 13:12:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:12:44', '2015-10-16 13:12:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:12:44', '2015-10-16 13:12:44', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:12:44', '2015-10-16 13:12:44', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:12:44', '2015-10-16 13:12:44', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:18:02', '2015-10-16 13:18:02', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:18:02', '2015-10-16 13:18:02', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:02', '2015-10-16 13:18:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:02', '2015-10-16 13:18:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:02', '2015-10-16 13:18:02', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:02', '2015-10-16 13:18:02', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:18:02', '2015-10-16 13:18:02', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:18:23', '2015-10-16 13:18:23', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:18:23', '2015-10-16 13:18:23', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:23', '2015-10-16 13:18:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:23', '2015-10-16 13:18:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:23', '2015-10-16 13:18:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:18:23', '2015-10-16 13:18:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:18:23', '2015-10-16 13:18:23', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:19:09', '2015-10-16 13:19:09', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:19:09', '2015-10-16 13:19:09', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:19:09', '2015-10-16 13:19:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:19:09', '2015-10-16 13:19:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:19:09', '2015-10-16 13:19:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:19:09', '2015-10-16 13:19:09', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:19:09', '2015-10-16 13:19:09', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:20:16', '2015-10-16 13:20:16', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:20:16', '2015-10-16 13:20:16', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:20:16', '2015-10-16 13:20:16', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:20:16', '2015-10-16 13:20:16', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:20:16', '2015-10-16 13:20:16', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:20:16', '2015-10-16 13:20:16', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:20:16', '2015-10-16 13:20:16', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:20:16.504438"], ["id", 1039265257]]  (0.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:21:32', '2015-10-16 13:21:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:21:32', '2015-10-16 13:21:32', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:21:32', '2015-10-16 13:21:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:21:32', '2015-10-16 13:21:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:21:32', '2015-10-16 13:21:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:21:32', '2015-10-16 13:21:32', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:21:32', '2015-10-16 13:21:32', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:26:07', '2015-10-16 13:26:07', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:26:07', '2015-10-16 13:26:07', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:26:07', '2015-10-16 13:26:07', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:07', '2015-10-16 13:26:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:07', '2015-10-16 13:26:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:07', '2015-10-16 13:26:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:07', '2015-10-16 13:26:07', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:26:08', '2015-10-16 13:26:08', 624739301) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:26:08', '2015-10-16 13:26:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:26:08', '2015-10-16 13:26:08', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:26:17.279360"], ["id", 1039265257]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:26:57', '2015-10-16 13:26:57', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:26:57', '2015-10-16 13:26:57', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:57', '2015-10-16 13:26:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:57', '2015-10-16 13:26:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:57', '2015-10-16 13:26:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:26:57', '2015-10-16 13:26:57', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:26:57', '2015-10-16 13:26:57', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:26:57.310019"], ["id", 1039265257]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:27:21', '2015-10-16 13:27:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:27:21', '2015-10-16 13:27:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:21', '2015-10-16 13:27:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:21', '2015-10-16 13:27:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:21', '2015-10-16 13:27:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:21', '2015-10-16 13:27:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:27:21', '2015-10-16 13:27:21', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:27:21.912726"], ["id", 1039265257]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:27:38', '2015-10-16 13:27:38', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:27:38', '2015-10-16 13:27:38', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:38', '2015-10-16 13:27:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:38', '2015-10-16 13:27:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:38', '2015-10-16 13:27:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:27:38', '2015-10-16 13:27:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:27:38', '2015-10-16 13:27:38', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:27:38.756228"], ["id", 1039265257]]  (0.9ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:28:27', '2015-10-16 13:28:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:28:27', '2015-10-16 13:28:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:27', '2015-10-16 13:28:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:27', '2015-10-16 13:28:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:27', '2015-10-16 13:28:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:27', '2015-10-16 13:28:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:28:27', '2015-10-16 13:28:27', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:28:27.364842"], ["id", 1039265257]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:28:49', '2015-10-16 13:28:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:28:49', '2015-10-16 13:28:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:49', '2015-10-16 13:28:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:49', '2015-10-16 13:28:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:49', '2015-10-16 13:28:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:28:49', '2015-10-16 13:28:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:28:49', '2015-10-16 13:28:49', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:29:06', '2015-10-16 13:29:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:29:06', '2015-10-16 13:29:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:29:06', '2015-10-16 13:29:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:29:06', '2015-10-16 13:29:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:29:06', '2015-10-16 13:29:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:29:06', '2015-10-16 13:29:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:29:06', '2015-10-16 13:29:06', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:31:50', '2015-10-16 13:31:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:31:50', '2015-10-16 13:31:50', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:31:50', '2015-10-16 13:31:50', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:31:50', '2015-10-16 13:31:50', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:31:50', '2015-10-16 13:31:50', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:31:50', '2015-10-16 13:31:50', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:31:50', '2015-10-16 13:31:50', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:32:17.093943"], ["id", 1039265257]]  (0.7ms) commit transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:32:51', '2015-10-16 13:32:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:32:51', '2015-10-16 13:32:51', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:32:51', '2015-10-16 13:32:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:32:51', '2015-10-16 13:32:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:32:51', '2015-10-16 13:32:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:32:51', '2015-10-16 13:32:51', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:32:51', '2015-10-16 13:32:51', 948421225)  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:32:58.666118"], ["id", 1039265257]]  (0.6ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:33:19', '2015-10-16 13:33:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:33:19', '2015-10-16 13:33:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:19', '2015-10-16 13:33:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:19', '2015-10-16 13:33:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:19', '2015-10-16 13:33:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:19', '2015-10-16 13:33:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:33:19', '2015-10-16 13:33:19', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:33:52', '2015-10-16 13:33:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:33:52', '2015-10-16 13:33:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:52', '2015-10-16 13:33:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:52', '2015-10-16 13:33:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:52', '2015-10-16 13:33:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:33:52', '2015-10-16 13:33:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:33:52', '2015-10-16 13:33:52', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:33:52.787296"], ["id", 1039265257]]  (1.1ms) commit transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:04', '2015-10-16 13:34:04', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:04', '2015-10-16 13:34:04', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:04', '2015-10-16 13:34:04', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:04', '2015-10-16 13:34:04', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:04', '2015-10-16 13:34:04', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:04', '2015-10-16 13:34:04', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:04', '2015-10-16 13:34:04', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 2f9bf4b1-03a2-42cc-8167-c81198160a56) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (1.1ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 2f9bf4b1-03a2-42cc-8167-c81198160a56\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 13:34:04.615546"], ["created_at", "2015-10-16 13:34:04.616721"], ["updated_at", "2015-10-16 13:34:04.616721"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:04.625092"], ["id", 14225656]]  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.8ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:04.882336"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (1.0ms) begin transaction  (0.2ms) commit transaction  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:15', '2015-10-16 13:34:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:15', '2015-10-16 13:34:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:15', '2015-10-16 13:34:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:15', '2015-10-16 13:34:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:15', '2015-10-16 13:34:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:15', '2015-10-16 13:34:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:15', '2015-10-16 13:34:15', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: a608c408-87e1-4633-9518-6df35b642e58) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: a608c408-87e1-4633-9518-6df35b642e58\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 13:34:15.932733"], ["created_at", "2015-10-16 13:34:15.933185"], ["updated_at", "2015-10-16 13:34:15.933185"]] [ActiveJob]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:15.937752"], ["id", 14225656]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:16.204355"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.4ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:17', '2015-10-16 13:34:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:17', '2015-10-16 13:34:17', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:17', '2015-10-16 13:34:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:17', '2015-10-16 13:34:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:17', '2015-10-16 13:34:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:17', '2015-10-16 13:34:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:17', '2015-10-16 13:34:17', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 36ms (Views: 4.0ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6c51a83568c91bc7eacbf3d9820260e4"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "6c51a83568c91bc7eacbf3d9820260e4"], ["created_at", "2015-10-16 13:34:17.841322"], ["updated_at", "2015-10-16 13:34:17.841322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 13:34:17.852131"], ["updated_at", "2015-10-16 13:34:17.852131"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "250079e581b2d53ab139095e3abcdb23"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "250079e581b2d53ab139095e3abcdb23"], ["created_at", "2015-10-16 13:34:17.884683"], ["updated_at", "2015-10-16 13:34:17.884683"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 13:34:17.925200"], ["updated_at", "2015-10-16 13:34:17.925200"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 13:34:17.928973"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 13:34:17.933215"], ["updated_at", "2015-10-16 13:34:17.933215"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:34:17.935266"], ["updated_at", "2015-10-16 13:34:17.935266"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f65cff88d516a0ad1e886d4f5b81d0d8"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f65cff88d516a0ad1e886d4f5b81d0d8"], ["created_at", "2015-10-16 13:34:17.938449"], ["updated_at", "2015-10-16 13:34:17.938449"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1fed02c70dea842739fc11006c8ca27e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1fed02c70dea842739fc11006c8ca27e"], ["created_at", "2015-10-16 13:34:17.941536"], ["updated_at", "2015-10-16 13:34:17.941536"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ee0d7a0852befc1c1b6c69e9a00a5bf9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ee0d7a0852befc1c1b6c69e9a00a5bf9"], ["created_at", "2015-10-16 13:34:17.947073"], ["updated_at", "2015-10-16 13:34:17.947073"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "43b37080eebcee199fda9855f4505f1a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "43b37080eebcee199fda9855f4505f1a"], ["created_at", "2015-10-16 13:34:17.949893"], ["updated_at", "2015-10-16 13:34:17.949893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3fcaeb6f33b253535936d476c3c21aca"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3fcaeb6f33b253535936d476c3c21aca"], ["created_at", "2015-10-16 13:34:17.953223"], ["updated_at", "2015-10-16 13:34:17.953223"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:34:17.959602"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:18.040891"], ["id", 335514824]]  (0.8ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:18', '2015-10-16 13:34:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:18', '2015-10-16 13:34:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:34:18.222765"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:18.312952"], ["id", 335514824]]  (0.7ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 13ms (Views: 4.1ms | ActiveRecord: 1.6ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:18', '2015-10-16 13:34:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:18', '2015-10-16 13:34:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:18', '2015-10-16 13:34:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:18', '2015-10-16 13:34:18', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [11f305a7-e8ac-48a2-9082-3e5d4e9f20f2] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [11f305a7-e8ac-48a2-9082-3e5d4e9f20f2] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 69.65ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 13:34:19.385470"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 13:34:19.704187"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784e7c88-ba92-43ac-9c84-87673299cc12] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 808.75ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:19', '2015-10-16 13:34:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:19', '2015-10-16 13:34:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:19', '2015-10-16 13:34:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:19', '2015-10-16 13:34:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:19', '2015-10-16 13:34:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:19', '2015-10-16 13:34:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:19', '2015-10-16 13:34:19', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 13:34:19.909361"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:34:19.915976"], ["updated_at", "2015-10-16 13:34:19.915976"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:34:19.922273"], ["updated_at", "2015-10-16 13:34:19.922273"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 13:34:19.923832"], ["updated_at", "2015-10-16 13:34:19.923832"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 13:34:19.925306"], ["updated_at", "2015-10-16 13:34:19.925306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 13:34:19.935324"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:56', '2015-10-16 13:34:56', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:56', '2015-10-16 13:34:56', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 13:34:56.309813"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:34:56.322246"], ["updated_at", "2015-10-16 13:34:56.322246"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:34:56.328720"], ["updated_at", "2015-10-16 13:34:56.328720"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-16 13:34:56.330241"], ["updated_at", "2015-10-16 13:34:56.330241"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-16 13:34:56.332350"], ["updated_at", "2015-10-16 13:34:56.332350"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ee7737e38253c49aa6434d019e063ee7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ee7737e38253c49aa6434d019e063ee7"], ["created_at", "2015-10-16 13:34:56.338231"], ["updated_at", "2015-10-16 13:34:56.338231"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1f8916ce94d947e32d34383613561078"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1f8916ce94d947e32d34383613561078"], ["created_at", "2015-10-16 13:34:56.341554"], ["updated_at", "2015-10-16 13:34:56.341554"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "58029968400d0a8da111ad267c862889"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "58029968400d0a8da111ad267c862889"], ["created_at", "2015-10-16 13:34:56.347725"], ["updated_at", "2015-10-16 13:34:56.347725"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f6e900fff42c0317f177dc0d4f0cfea4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f6e900fff42c0317f177dc0d4f0cfea4"], ["created_at", "2015-10-16 13:34:56.351023"], ["updated_at", "2015-10-16 13:34:56.351023"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "feb68d825f9b9dd24d6d97167fb18d49"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "feb68d825f9b9dd24d6d97167fb18d49"], ["created_at", "2015-10-16 13:34:56.355727"], ["updated_at", "2015-10-16 13:34:56.355727"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:34:56.364877"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:56.448333"], ["id", 335514824]]  (0.8ms) commit transaction  (0.3ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:56', '2015-10-16 13:34:56', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:56', '2015-10-16 13:34:56', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:56', '2015-10-16 13:34:56', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:56', '2015-10-16 13:34:56', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d7f331a32e03b791647117032090439e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "d7f331a32e03b791647117032090439e"], ["created_at", "2015-10-16 13:34:56.657442"], ["updated_at", "2015-10-16 13:34:56.657442"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e899410a-1d3d-43cb-89a6-87c224dfd7c4] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e899410a-1d3d-43cb-89a6-87c224dfd7c4] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 53.4ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-16 13:34:57.495397"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-16 13:34:57.914318"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be7ba26f-05c7-4a68-9c8b-1b3871219e99] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 798.84ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:34:58', '2015-10-16 13:34:58', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:34:58', '2015-10-16 13:34:58', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:58', '2015-10-16 13:34:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:58', '2015-10-16 13:34:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:58', '2015-10-16 13:34:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:34:58', '2015-10-16 13:34:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:34:58', '2015-10-16 13:34:58', 948421225)  (1.4ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-16 13:34:58.128008"], ["updated_at", "2015-10-16 13:34:58.128008"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-16 13:34:58.132974"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-16 13:34:58.137995"], ["updated_at", "2015-10-16 13:34:58.137995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-16 13:34:58.140857"], ["updated_at", "2015-10-16 13:34:58.140857"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-16 13:34:58.153502"], ["id", 785871319]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 3.6ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "222a151d14d68e4d626c39fca3a430cd"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "222a151d14d68e4d626c39fca3a430cd"], ["created_at", "2015-10-16 13:34:58.207681"], ["updated_at", "2015-10-16 13:34:58.207681"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-16 13:34:58.212296"], ["updated_at", "2015-10-16 13:34:58.212296"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 448baeb9-55b3-4bda-aa94-52bd055137af) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.8ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 448baeb9-55b3-4bda-aa94-52bd055137af\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-16 13:34:58.372525"], ["created_at", "2015-10-16 13:34:58.372963"], ["updated_at", "2015-10-16 13:34:58.372963"]] [ActiveJob]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:58.378294"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:34:58.613494"], ["id", 1039265257]]  (1.2ms) commit transaction  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) begin transaction  (0.1ms) commit transaction  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-16 13:35:00', '2015-10-16 13:35:00', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-16 13:35:00', '2015-10-16 13:35:00', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:35:00', '2015-10-16 13:35:00', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:35:00', '2015-10-16 13:35:00', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:35:00', '2015-10-16 13:35:00', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-16 13:35:00', '2015-10-16 13:35:00', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-16 13:35:00', '2015-10-16 13:35:00', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-16 13:35:00.175943"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.4ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-16 13:35:00.273014"], ["id", 335514824]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 13ms (Views: 3.9ms | ActiveRecord: 1.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.8ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 06:57:57', '2015-10-19 06:57:57', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 06:57:57', '2015-10-19 06:57:57', 731805050) Fixture Delete (0.6ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:57:57', '2015-10-19 06:57:57', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:57:57', '2015-10-19 06:57:57', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:57:57', '2015-10-19 06:57:57', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:57:57', '2015-10-19 06:57:57', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 06:57:57', '2015-10-19 06:57:57', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 06:57:57.226191"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 2.1ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 06:57:57.307239"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 13ms (Views: 3.8ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 06:58:07', '2015-10-19 06:58:07', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 06:58:07', '2015-10-19 06:58:07', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:07', '2015-10-19 06:58:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:07', '2015-10-19 06:58:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:07', '2015-10-19 06:58:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:07', '2015-10-19 06:58:07', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 06:58:07', '2015-10-19 06:58:07', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ----------------------------------------------------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id --------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload -------------------------------------------------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 06:58:19', '2015-10-19 06:58:19', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 06:58:19', '2015-10-19 06:58:19', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:19', '2015-10-19 06:58:19', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:19', '2015-10-19 06:58:19', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:19', '2015-10-19 06:58:19', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 06:58:19', '2015-10-19 06:58:19', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 06:58:19', '2015-10-19 06:58:19', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 06:58:19.752130"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 06:58:19.758172"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 06:58:19.761831"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:00:26', '2015-10-19 07:00:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:00:26', '2015-10-19 07:00:26', 731805050) Fixture Delete (0.7ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:00:26', '2015-10-19 07:00:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:00:26', '2015-10-19 07:00:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:00:26', '2015-10-19 07:00:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:00:26', '2015-10-19 07:00:26', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:00:26', '2015-10-19 07:00:26', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:00:26.946715"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:00:27.397476"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:00:27.818149"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:01:26', '2015-10-19 07:01:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:01:26', '2015-10-19 07:01:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:01:26', '2015-10-19 07:01:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:01:26', '2015-10-19 07:01:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:01:26', '2015-10-19 07:01:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:01:26', '2015-10-19 07:01:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:01:26', '2015-10-19 07:01:26', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:01:26.552320"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:01:26.560661"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:01:26.564833"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:01:26.571177"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]] Completed 500 Internal Server Error in 1ms (ActiveRecord: 0.1ms)  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:03:17', '2015-10-19 07:03:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:03:17', '2015-10-19 07:03:17', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:17', '2015-10-19 07:03:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:17', '2015-10-19 07:03:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:17', '2015-10-19 07:03:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:17', '2015-10-19 07:03:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:03:17', '2015-10-19 07:03:17', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:03:17.818227"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:03:17.827842"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (ActiveRecord: 0.8ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:03:17.833442"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:03:17.839353"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:03:38', '2015-10-19 07:03:38', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:03:38', '2015-10-19 07:03:38', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:38', '2015-10-19 07:03:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:38', '2015-10-19 07:03:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:38', '2015-10-19 07:03:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:03:38', '2015-10-19 07:03:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:03:38', '2015-10-19 07:03:38', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:03:38.977795"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:03:38.985835"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:03:38.990862"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:03:38.999270"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:04:03', '2015-10-19 07:04:03', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:04:03', '2015-10-19 07:04:03', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:03', '2015-10-19 07:04:03', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:03', '2015-10-19 07:04:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:03', '2015-10-19 07:04:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:03', '2015-10-19 07:04:03', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:04:03', '2015-10-19 07:04:03', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:04:03.733907"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:04:03.741852"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.6ms)  (0.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:04:21', '2015-10-19 07:04:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:04:21', '2015-10-19 07:04:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:21', '2015-10-19 07:04:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:21', '2015-10-19 07:04:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:21', '2015-10-19 07:04:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:21', '2015-10-19 07:04:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:04:21', '2015-10-19 07:04:21', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:04:22.013040"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:04:42.807942"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20792ms (ActiveRecord: 0.9ms)  (4.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:04:54', '2015-10-19 07:04:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:04:54', '2015-10-19 07:04:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:54', '2015-10-19 07:04:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:54', '2015-10-19 07:04:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:54', '2015-10-19 07:04:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:04:54', '2015-10-19 07:04:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:04:54', '2015-10-19 07:04:54', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:04:54.984623"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:04:54.992424"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms)  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-19 07:05:16.014206"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (4.8ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:05:40', '2015-10-19 07:05:40', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:05:40', '2015-10-19 07:05:40', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:05:40', '2015-10-19 07:05:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:05:40', '2015-10-19 07:05:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:05:40', '2015-10-19 07:05:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:05:40', '2015-10-19 07:05:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:05:40', '2015-10-19 07:05:40', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:05:40.918813"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:05:44.011437"], ["id", 538821867]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3090ms (ActiveRecord: 0.7ms)  (4.7ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:06:02', '2015-10-19 07:06:02', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:06:02', '2015-10-19 07:06:02', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:02', '2015-10-19 07:06:02', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:02', '2015-10-19 07:06:02', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:02', '2015-10-19 07:06:02', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:02', '2015-10-19 07:06:02', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:06:02', '2015-10-19 07:06:02', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:06:02.332208"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:06:02.340056"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:06:25', '2015-10-19 07:06:25', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:06:25', '2015-10-19 07:06:25', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:25', '2015-10-19 07:06:25', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:25', '2015-10-19 07:06:25', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:25', '2015-10-19 07:06:25', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:25', '2015-10-19 07:06:25', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:06:25', '2015-10-19 07:06:25', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:06:25.799727"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:06:25.807499"], ["id", 538821867]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.9ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:06:53', '2015-10-19 07:06:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:06:53', '2015-10-19 07:06:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:53', '2015-10-19 07:06:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:53', '2015-10-19 07:06:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:53', '2015-10-19 07:06:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:06:53', '2015-10-19 07:06:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:06:53', '2015-10-19 07:06:53', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["updated_at", "2015-10-19 07:06:53.998561"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:07:22.060100"], ["id", 538821867]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 28059ms (ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (4.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:07:41', '2015-10-19 07:07:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:07:41', '2015-10-19 07:07:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:41', '2015-10-19 07:07:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:41', '2015-10-19 07:07:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:41', '2015-10-19 07:07:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:41', '2015-10-19 07:07:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:07:41', '2015-10-19 07:07:41', 948421225)  (5.5ms) commit transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:07:41.054218"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:07:41.062162"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:07:48', '2015-10-19 07:07:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:07:48', '2015-10-19 07:07:48', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:48', '2015-10-19 07:07:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:48', '2015-10-19 07:07:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:48', '2015-10-19 07:07:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:07:48', '2015-10-19 07:07:48', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:07:48', '2015-10-19 07:07:48', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:07:48.589248"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:07:48.597584"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:07:48.602234"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:07:48.607115"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:08:10', '2015-10-19 07:08:10', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:08:10', '2015-10-19 07:08:10', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:10', '2015-10-19 07:08:10', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:10', '2015-10-19 07:08:10', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:10', '2015-10-19 07:08:10', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:10', '2015-10-19 07:08:10', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:08:10', '2015-10-19 07:08:10', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:08:10.556807"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 1.3ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:08:10.623772"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 17ms (Views: 3.6ms | ActiveRecord: 2.0ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:08:18', '2015-10-19 07:08:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:08:18', '2015-10-19 07:08:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:18', '2015-10-19 07:08:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:18', '2015-10-19 07:08:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:18', '2015-10-19 07:08:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:18', '2015-10-19 07:08:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:08:18', '2015-10-19 07:08:18', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "979ec55e2296089032e629e00944c300"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "979ec55e2296089032e629e00944c300"], ["created_at", "2015-10-19 07:08:18.481473"], ["updated_at", "2015-10-19 07:08:18.481473"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 32ms (Views: 1.8ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 5bafa35c-5ea8-4d41-baa1-b86e824885ad) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 5bafa35c-5ea8-4d41-baa1-b86e824885ad\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-19 07:08:18.666130"], ["created_at", "2015-10-19 07:08:18.666581"], ["updated_at", "2015-10-19 07:08:18.666581"]] [ActiveJob]  (0.6ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-19 07:08:18.670737"], ["id", 14225656]]  (0.5ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:08:18.912857"], ["id", 1039265257]]  (0.9ms) commit transaction  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.0ms) commit transaction  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:08:20', '2015-10-19 07:08:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:08:20', '2015-10-19 07:08:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-19 07:08:20.484515"], ["updated_at", "2015-10-19 07:08:20.484515"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-19 07:08:20.490281"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-19 07:08:20.495967"], ["updated_at", "2015-10-19 07:08:20.495967"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:08:20.498786"], ["updated_at", "2015-10-19 07:08:20.498786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:08:20.513959"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:08:20.519244"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:08:20.523615"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:08:20.528140"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:08:20.535038"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:08:20.588442"], ["id", 335514824]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 12ms (Views: 2.8ms | ActiveRecord: 1.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:08:20', '2015-10-19 07:08:20', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:08:20', '2015-10-19 07:08:20', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:20', '2015-10-19 07:08:20', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:08:20', '2015-10-19 07:08:20', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c69da44b-bad0-4ff2-8ba3-922336d50fc0] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c69da44b-bad0-4ff2-8ba3-922336d50fc0] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 50.92ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-19 07:08:22.579055"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-19 07:08:22.882411"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fccfe25c-4ea8-4865-b720-0d2f5caa43cd] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1708.2ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:08:23', '2015-10-19 07:08:23', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:08:23', '2015-10-19 07:08:23', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 948421225)  (1.2ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-19 07:08:23.075628"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-19 07:08:23.114689"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:08:23.119692"], ["updated_at", "2015-10-19 07:08:23.119692"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:08:23.125145"], ["updated_at", "2015-10-19 07:08:23.125145"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-19 07:08:23.126290"], ["updated_at", "2015-10-19 07:08:23.126290"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-19 07:08:23.127383"], ["updated_at", "2015-10-19 07:08:23.127383"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4f38381abf0d8ef945c58fe1dcdac109"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4f38381abf0d8ef945c58fe1dcdac109"], ["created_at", "2015-10-19 07:08:23.132280"], ["updated_at", "2015-10-19 07:08:23.132280"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8f88f525b21aac97bd7dc3bc136c2749"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8f88f525b21aac97bd7dc3bc136c2749"], ["created_at", "2015-10-19 07:08:23.134914"], ["updated_at", "2015-10-19 07:08:23.134914"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fc4e89d660ea4a54c2165ffb2241184b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fc4e89d660ea4a54c2165ffb2241184b"], ["created_at", "2015-10-19 07:08:23.139319"], ["updated_at", "2015-10-19 07:08:23.139319"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8301ff2dc5f300cdfc0299c763b3b43b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8301ff2dc5f300cdfc0299c763b3b43b"], ["created_at", "2015-10-19 07:08:23.141933"], ["updated_at", "2015-10-19 07:08:23.141933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a424b8cb3ac4e891387871bff00d49b0"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a424b8cb3ac4e891387871bff00d49b0"], ["created_at", "2015-10-19 07:08:23.145185"], ["updated_at", "2015-10-19 07:08:23.145185"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:08:23.151378"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:08:23.244642"], ["id", 335514824]]  (0.8ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:08:23', '2015-10-19 07:08:23', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:08:23', '2015-10-19 07:08:23', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:08:23', '2015-10-19 07:08:23', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:08:23', '2015-10-19 07:08:23', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 19ms (Views: 4.2ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "11519ce7dd432a7de1a8f1a0e42ca142"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "11519ce7dd432a7de1a8f1a0e42ca142"], ["created_at", "2015-10-19 07:08:23.453462"], ["updated_at", "2015-10-19 07:08:23.453462"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-19 07:08:23.456306"], ["updated_at", "2015-10-19 07:08:23.456306"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.2ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:17:24', '2015-10-19 07:17:24', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:17:24', '2015-10-19 07:17:24', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:24', '2015-10-19 07:17:24', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:24', '2015-10-19 07:17:24', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:24', '2015-10-19 07:17:24', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:24', '2015-10-19 07:17:24', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:17:24', '2015-10-19 07:17:24', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 4a073ecc-fd59-4359-9044-9e146e8f7cac) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 4a073ecc-fd59-4359-9044-9e146e8f7cac\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-19 07:17:24.407456"], ["created_at", "2015-10-19 07:17:24.407812"], ["updated_at", "2015-10-19 07:17:24.407812"]] [ActiveJob]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-19 07:17:24.411532"], ["id", 14225656]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:17:24.676191"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:17:26', '2015-10-19 07:17:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:17:26', '2015-10-19 07:17:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "427c76fd70fb921cca6d541fc3c3833c"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "427c76fd70fb921cca6d541fc3c3833c"], ["created_at", "2015-10-19 07:17:26.228940"], ["updated_at", "2015-10-19 07:17:26.228940"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 3.0ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-19 07:17:26.272441"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-19 07:17:26.291151"], ["updated_at", "2015-10-19 07:17:26.291151"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-19 07:17:26.295805"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-19 07:17:26.299467"], ["updated_at", "2015-10-19 07:17:26.299467"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:17:26.301714"], ["updated_at", "2015-10-19 07:17:26.301714"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "001bea779e5a4790191866b6a6de7264"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "001bea779e5a4790191866b6a6de7264"], ["created_at", "2015-10-19 07:17:26.308934"], ["updated_at", "2015-10-19 07:17:26.308934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cee1110e48ea40feb51e791d164a6fe4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cee1110e48ea40feb51e791d164a6fe4"], ["created_at", "2015-10-19 07:17:26.312613"], ["updated_at", "2015-10-19 07:17:26.312613"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6a42c7c0bbc22ed2471ccd0cb70f58cd"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6a42c7c0bbc22ed2471ccd0cb70f58cd"], ["created_at", "2015-10-19 07:17:26.318169"], ["updated_at", "2015-10-19 07:17:26.318169"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a45135cf6b5d03f79c0cd37e736ef5d4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a45135cf6b5d03f79c0cd37e736ef5d4"], ["created_at", "2015-10-19 07:17:26.320698"], ["updated_at", "2015-10-19 07:17:26.320698"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a02b8a94144d5efe6591530bda7ef1dc"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a02b8a94144d5efe6591530bda7ef1dc"], ["created_at", "2015-10-19 07:17:26.324044"], ["updated_at", "2015-10-19 07:17:26.324044"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:17:26.330343"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:17:26.418064"], ["id", 335514824]]  (0.9ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:17:26', '2015-10-19 07:17:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:17:26', '2015-10-19 07:17:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:26', '2015-10-19 07:17:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:17:26', '2015-10-19 07:17:26', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7038aa63-afa9-4773-abac-0ee99f2a218a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7038aa63-afa9-4773-abac-0ee99f2a218a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 27.08ms  (0.7ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb]  (1.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-19 07:17:28.724195"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-19 07:17:28.996482"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a7241bb6-2f35-4d05-a6a6-a58c11369dbb] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2015.44ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:17:29', '2015-10-19 07:17:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:17:29', '2015-10-19 07:17:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 3.6ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d786250c37e0053bc9c7bcf5386bbe4f"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "d786250c37e0053bc9c7bcf5386bbe4f"], ["created_at", "2015-10-19 07:17:29.235849"], ["updated_at", "2015-10-19 07:17:29.235849"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-19 07:17:29.242551"], ["updated_at", "2015-10-19 07:17:29.242551"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:17:29.270534"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:17:29.274485"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:17:29.279328"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:17:29.285166"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:17:29.295803"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.1ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (1.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:17:29.355225"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 11ms (Views: 2.8ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:17:29', '2015-10-19 07:17:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:17:29', '2015-10-19 07:17:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:17:29', '2015-10-19 07:17:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:17:29', '2015-10-19 07:17:29', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-19 07:17:29.577000"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:17:29.583974"], ["updated_at", "2015-10-19 07:17:29.583974"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:17:29.589892"], ["updated_at", "2015-10-19 07:17:29.589892"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-19 07:17:29.591035"], ["updated_at", "2015-10-19 07:17:29.591035"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-19 07:17:29.592213"], ["updated_at", "2015-10-19 07:17:29.592213"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:41:32', '2015-10-19 07:41:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:41:32', '2015-10-19 07:41:32', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:32', '2015-10-19 07:41:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:32', '2015-10-19 07:41:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:32', '2015-10-19 07:41:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:32', '2015-10-19 07:41:32', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:41:32', '2015-10-19 07:41:32', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:32.727396"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:41:32.736091"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:32.743398"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:32.750256"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:32.755898"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 132093124) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:41:42', '2015-10-19 07:41:42', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:41:42', '2015-10-19 07:41:42', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:42', '2015-10-19 07:41:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:42', '2015-10-19 07:41:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:42', '2015-10-19 07:41:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:42', '2015-10-19 07:41:42', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:41:42', '2015-10-19 07:41:42', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 55c43616-8ea6-4496-aa81-59ad4bfeba30) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.3ms) begin transaction [ActiveJob] SQL (1.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 55c43616-8ea6-4496-aa81-59ad4bfeba30\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2015-10-19 07:41:42.404356"], ["created_at", "2015-10-19 07:41:42.404945"], ["updated_at", "2015-10-19 07:41:42.404945"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2015-10-19 07:41:42.410554"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:41:42.658737"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) begin transaction  (0.1ms) commit transaction  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 937304175) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:41:44', '2015-10-19 07:41:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:41:44', '2015-10-19 07:41:44', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1e9a3855fbaa0bab85a8fd45348d14c2"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1e9a3855fbaa0bab85a8fd45348d14c2"], ["created_at", "2015-10-19 07:41:44.115934"], ["updated_at", "2015-10-19 07:41:44.115934"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "59d3924f77922e50713cb8055ea29b45"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "59d3924f77922e50713cb8055ea29b45"], ["created_at", "2015-10-19 07:41:44.121042"], ["updated_at", "2015-10-19 07:41:44.121042"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (8.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fde64ffba12b88a05536b90ee8868deb"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fde64ffba12b88a05536b90ee8868deb"], ["created_at", "2015-10-19 07:41:44.137048"], ["updated_at", "2015-10-19 07:41:44.137048"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bc5a04f448ff7114b526785505069749"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bc5a04f448ff7114b526785505069749"], ["created_at", "2015-10-19 07:41:44.141792"], ["updated_at", "2015-10-19 07:41:44.141792"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (8.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3f7134c96fb81c76f4f04c48eaec6c57"]] SQL (1.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3f7134c96fb81c76f4f04c48eaec6c57"], ["created_at", "2015-10-19 07:41:44.154782"], ["updated_at", "2015-10-19 07:41:44.154782"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:41:44.171525"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:41:44.307315"], ["id", 335514824]]  (0.7ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:41:44', '2015-10-19 07:41:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:41:44', '2015-10-19 07:41:44', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:44.487196"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2015-10-19 07:41:44.495229"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:44.499965"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:44.506114"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2015-10-19 07:41:44.510970"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 35ms (Views: 3.8ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "30ff2d74dced61342aeafcb493e288ad"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "30ff2d74dced61342aeafcb493e288ad"], ["created_at", "2015-10-19 07:41:44.585372"], ["updated_at", "2015-10-19 07:41:44.585372"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2015-10-19 07:41:44.597119"], ["updated_at", "2015-10-19 07:41:44.597119"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.3ms)  (1.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5ecfb63b46c92e15553c884568decacd"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "5ecfb63b46c92e15553c884568decacd"], ["created_at", "2015-10-19 07:41:44.649424"], ["updated_at", "2015-10-19 07:41:44.649424"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.2ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2015-10-19 07:41:44.676744"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2015-10-19 07:41:44.733887"], ["id", 335514824]]  (1.0ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 13ms (Views: 3.2ms | ActiveRecord: 1.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2015-10-19 07:41:44', '2015-10-19 07:41:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2015-10-19 07:41:44', '2015-10-19 07:41:44', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2015-10-19 07:41:44', '2015-10-19 07:41:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2015-10-19 07:41:44', '2015-10-19 07:41:44', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-19 07:41:44.931860"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:41:44.938853"], ["updated_at", "2015-10-19 07:41:44.938853"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:41:44.945798"], ["updated_at", "2015-10-19 07:41:44.945798"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2015-10-19 07:41:44.947031"], ["updated_at", "2015-10-19 07:41:44.947031"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2015-10-19 07:41:44.948186"], ["updated_at", "2015-10-19 07:41:44.948186"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2015-10-19 07:41:44.960217"], ["updated_at", "2015-10-19 07:41:44.960217"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2015-10-19 07:41:44.965064"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2015-10-19 07:41:44.969622"], ["updated_at", "2015-10-19 07:41:44.969622"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2015-10-19 07:41:44.972039"], ["updated_at", "2015-10-19 07:41:44.972039"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2015-10-19 07:41:44.980959"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f05b9c22-5da3-4a7a-98ff-c86a356f5151] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f05b9c22-5da3-4a7a-98ff-c86a356f5151] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 53.86ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2015-10-19 07:41:47.133822"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2015-10-19 07:41:47.379853"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d311dfb4-45ef-44fa-99ff-cb6e55b9e304] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2002.06ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:28:30', '2016-01-18 14:28:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:28:30', '2016-01-18 14:28:30', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:30', '2016-01-18 14:28:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:30', '2016-01-18 14:28:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:30', '2016-01-18 14:28:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:30', '2016-01-18 14:28:30', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:28:30', '2016-01-18 14:28:30', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 44ms (Views: 3.9ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "eb15a7befba1dd85bc576c3ca189c8e7"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "eb15a7befba1dd85bc576c3ca189c8e7"], ["created_at", "2016-01-18 14:28:30.817338"], ["updated_at", "2016-01-18 14:28:30.817338"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-01-18 14:28:30.827386"], ["updated_at", "2016-01-18 14:28:30.827386"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "501b85960e2e59976ff143dd335b7cf9"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "501b85960e2e59976ff143dd335b7cf9"], ["created_at", "2016-01-18 14:28:30.859244"], ["updated_at", "2016-01-18 14:28:30.859244"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-01-18 14:28:30.892881"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.2ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:28:30.958489"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 14ms (Views: 3.4ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:28:31', '2016-01-18 14:28:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:28:31', '2016-01-18 14:28:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:31', '2016-01-18 14:28:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:31', '2016-01-18 14:28:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:31', '2016-01-18 14:28:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:31', '2016-01-18 14:28:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:28:31', '2016-01-18 14:28:31', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 4fbc05f2-0bb1-408b-9a8f-ac59d9c06660) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (1.2ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 4fbc05f2-0bb1-408b-9a8f-ac59d9c06660\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-01-18 14:28:31.328815"], ["created_at", "2016-01-18 14:28:31.329458"], ["updated_at", "2016-01-18 14:28:31.329458"]] [ActiveJob]  (0.9ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-01-18 14:28:31.335118"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:28:31.572218"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:28:33', '2016-01-18 14:28:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:28:33', '2016-01-18 14:28:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:33', '2016-01-18 14:28:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:33', '2016-01-18 14:28:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:33', '2016-01-18 14:28:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:33', '2016-01-18 14:28:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:28:33', '2016-01-18 14:28:33', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [58c36199-e8ce-4b3b-9fed-e5e64af5a238] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [58c36199-e8ce-4b3b-9fed-e5e64af5a238] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 51.28ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:28:34.350950"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:28:34.536023"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4105921c-0bc9-4e97-bead-b493e9345819] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1004.97ms  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:28:35', '2016-01-18 14:28:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:28:35', '2016-01-18 14:28:35', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "30c921df55e8e50f390225a0b71d43ba"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "30c921df55e8e50f390225a0b71d43ba"], ["created_at", "2016-01-18 14:28:35.018438"], ["updated_at", "2016-01-18 14:28:35.018438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "873ba2b732f9bd69e55160ae5f2d2392"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "873ba2b732f9bd69e55160ae5f2d2392"], ["created_at", "2016-01-18 14:28:35.022460"], ["updated_at", "2016-01-18 14:28:35.022460"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "af4ee7932d00978be249f68956701603"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "af4ee7932d00978be249f68956701603"], ["created_at", "2016-01-18 14:28:35.027962"], ["updated_at", "2016-01-18 14:28:35.027962"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "faef51ad7852992209b6d232fef1b2b6"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "faef51ad7852992209b6d232fef1b2b6"], ["created_at", "2016-01-18 14:28:35.030607"], ["updated_at", "2016-01-18 14:28:35.030607"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d0eed4bd9c1ca5db20e00987c1616955"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d0eed4bd9c1ca5db20e00987c1616955"], ["created_at", "2016-01-18 14:28:35.034440"], ["updated_at", "2016-01-18 14:28:35.034440"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-01-18 14:28:35.041603"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:28:35.137497"], ["id", 335514824]]  (0.6ms) commit transaction  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:28:35', '2016-01-18 14:28:35', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:28:35', '2016-01-18 14:28:35', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:35', '2016-01-18 14:28:35', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:28:35', '2016-01-18 14:28:35', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.2ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-01-18 14:28:35.332079"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-01-18 14:28:35.346516"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:28:35.352157"], ["updated_at", "2016-01-18 14:28:35.352157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:28:35.359561"], ["updated_at", "2016-01-18 14:28:35.359561"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-01-18 14:28:35.361116"], ["updated_at", "2016-01-18 14:28:35.361116"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-01-18 14:28:35.362512"], ["updated_at", "2016-01-18 14:28:35.362512"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:28:35.380147"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-01-18 14:28:35.384721"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:28:35.389738"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:28:35.397072"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:28:35.402928"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-01-18 14:28:35.414210"], ["updated_at", "2016-01-18 14:28:35.414210"]]  (0.5ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-01-18 14:28:35.419269"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-01-18 14:28:35.424134"], ["updated_at", "2016-01-18 14:28:35.424134"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:28:35.428012"], ["updated_at", "2016-01-18 14:28:35.428012"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:28:54', '2016-01-18 14:28:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:28:54', '2016-01-18 14:28:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:54', '2016-01-18 14:28:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:54', '2016-01-18 14:28:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:54', '2016-01-18 14:28:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:28:54', '2016-01-18 14:28:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:28:54', '2016-01-18 14:28:54', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [602ff661-0b8c-4326-9a4f-07a362239b23] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [602ff661-0b8c-4326-9a4f-07a362239b23] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 27.44ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:28:55.236114"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:28:55.407162"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1ee628be-9531-4558-894b-9dce79d7a69a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 367.44ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:29:49', '2016-01-18 14:29:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:29:49', '2016-01-18 14:29:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:29:49', '2016-01-18 14:29:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:29:49', '2016-01-18 14:29:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:29:49', '2016-01-18 14:29:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:29:49', '2016-01-18 14:29:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:29:49', '2016-01-18 14:29:49', 948421225)  (5.4ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2bee758b-5ebf-4a01-b2cb-a280dd119eae] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2bee758b-5ebf-4a01-b2cb-a280dd119eae] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 26.66ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:29:50.335211"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:29:50.519243"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f]  (0.2ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [240f154b-dee5-4201-9845-d41d06867e0f] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 388.68ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:30:34', '2016-01-18 14:30:34', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:30:34', '2016-01-18 14:30:34', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:30:34', '2016-01-18 14:30:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:30:34', '2016-01-18 14:30:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:30:34', '2016-01-18 14:30:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:30:34', '2016-01-18 14:30:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:30:34', '2016-01-18 14:30:34', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0f66ecb2-9369-4256-92b8-2eee6b1c0a8d] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0f66ecb2-9369-4256-92b8-2eee6b1c0a8d] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 27.22ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:30:34.976424"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:30:35.156430"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b9bc46bb-42f3-4a26-8a2a-afc35f3a2419] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 381.84ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:31:08', '2016-01-18 14:31:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:31:08', '2016-01-18 14:31:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:31:08', '2016-01-18 14:31:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:31:08', '2016-01-18 14:31:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:31:08', '2016-01-18 14:31:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:31:08', '2016-01-18 14:31:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:31:08', '2016-01-18 14:31:08', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [17c5cbbb-9478-4a67-b131-ece4d03ff6f8] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [17c5cbbb-9478-4a67-b131-ece4d03ff6f8] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 26.86ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:31:09.393915"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3]  (1.3ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:31:09.582713"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c29b09b6-6f33-4850-bcd3-98515ded6cc3] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 382.43ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:17', '2016-01-18 14:32:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:17', '2016-01-18 14:32:17', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:17', '2016-01-18 14:32:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:17', '2016-01-18 14:32:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:17', '2016-01-18 14:32:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:17', '2016-01-18 14:32:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:17', '2016-01-18 14:32:17', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [654eacb1-4f23-4919-849b-b5572837581e] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [654eacb1-4f23-4919-849b-b5572837581e] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 32.68ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:32:18.993000"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:32:19.452707"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ef4e5760-aca7-4977-b36d-f5e87c861015] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1492.57ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:26', '2016-01-18 14:32:26', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:26', '2016-01-18 14:32:26', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:26', '2016-01-18 14:32:26', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:26', '2016-01-18 14:32:26', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:26', '2016-01-18 14:32:26', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:26', '2016-01-18 14:32:26', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:26', '2016-01-18 14:32:26', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cfb68307f69090b46cfe6663d396a59d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "cfb68307f69090b46cfe6663d396a59d"], ["created_at", "2016-01-18 14:32:26.701680"], ["updated_at", "2016-01-18 14:32:26.701680"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (Views: 1.5ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 7ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 38a45fad-f891-4781-9d94-34e773615869) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 38a45fad-f891-4781-9d94-34e773615869\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-01-18 14:32:26.848415"], ["created_at", "2016-01-18 14:32:26.848853"], ["updated_at", "2016-01-18 14:32:26.848853"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:26.852887"], ["id", 14225656]]  (0.5ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:27.084118"], ["id", 1039265257]]  (0.8ms) commit transaction  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.4ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:28', '2016-01-18 14:32:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:28', '2016-01-18 14:32:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 948421225)  (5.4ms) commit transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:28.631479"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-01-18 14:32:28.639241"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:28.645539"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:28.653131"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:28.659749"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-01-18 14:32:28.674933"], ["updated_at", "2016-01-18 14:32:28.674933"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-01-18 14:32:28.679866"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-01-18 14:32:28.684695"], ["updated_at", "2016-01-18 14:32:28.684695"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:32:28.687630"], ["updated_at", "2016-01-18 14:32:28.687630"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "25e4ce9999e6ce1a6ff1586a192fd521"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "25e4ce9999e6ce1a6ff1586a192fd521"], ["created_at", "2016-01-18 14:32:28.713128"], ["updated_at", "2016-01-18 14:32:28.713128"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c3a2528d7426ee9f4c8efcf7947f7f64"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c3a2528d7426ee9f4c8efcf7947f7f64"], ["created_at", "2016-01-18 14:32:28.716762"], ["updated_at", "2016-01-18 14:32:28.716762"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0cb5db9b3149ed7402341c4554ec6931"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0cb5db9b3149ed7402341c4554ec6931"], ["created_at", "2016-01-18 14:32:28.721918"], ["updated_at", "2016-01-18 14:32:28.721918"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bd3edde39f2c014fcdf7ae14e6be311b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bd3edde39f2c014fcdf7ae14e6be311b"], ["created_at", "2016-01-18 14:32:28.724609"], ["updated_at", "2016-01-18 14:32:28.724609"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "53f09c4b3a3d271c1556ada009aa9c49"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "53f09c4b3a3d271c1556ada009aa9c49"], ["created_at", "2016-01-18 14:32:28.728112"], ["updated_at", "2016-01-18 14:32:28.728112"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-01-18 14:32:28.734865"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:28.823291"], ["id", 335514824]]  (0.8ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:28', '2016-01-18 14:32:28', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:28', '2016-01-18 14:32:28', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:28', '2016-01-18 14:32:28', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:28', '2016-01-18 14:32:28', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [71bd71ae-5c9c-490c-a967-0be064243f90] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [71bd71ae-5c9c-490c-a967-0be064243f90] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 26.83ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:32:29.570683"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc]  (0.3ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:32:29.752975"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc]  (1.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ed2a8b73-1898-48b6-962b-7745042148cc] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 386.18ms Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:29', '2016-01-18 14:32:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:29', '2016-01-18 14:32:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:29', '2016-01-18 14:32:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:29', '2016-01-18 14:32:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:29', '2016-01-18 14:32:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:29', '2016-01-18 14:32:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:29', '2016-01-18 14:32:29', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-01-18 14:32:29.947624"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 26ms (Views: 3.4ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5a9276544d7bfb88ceeb868482579332"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "5a9276544d7bfb88ceeb868482579332"], ["created_at", "2016-01-18 14:32:30.019279"], ["updated_at", "2016-01-18 14:32:30.019279"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-01-18 14:32:30.027524"], ["updated_at", "2016-01-18 14:32:30.027524"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-01-18 14:32:30.062629"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:32:30.069163"], ["updated_at", "2016-01-18 14:32:30.069163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:32:30.077093"], ["updated_at", "2016-01-18 14:32:30.077093"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-01-18 14:32:30.078711"], ["updated_at", "2016-01-18 14:32:30.078711"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-01-18 14:32:30.080356"], ["updated_at", "2016-01-18 14:32:30.080356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-01-18 14:32:30.091116"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:30.149385"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 14ms (Views: 3.0ms | ActiveRecord: 1.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:30', '2016-01-18 14:32:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:30', '2016-01-18 14:32:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:30', '2016-01-18 14:32:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:30', '2016-01-18 14:32:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:30', '2016-01-18 14:32:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:30', '2016-01-18 14:32:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:30', '2016-01-18 14:32:30', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:38', '2016-01-18 14:32:38', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:38', '2016-01-18 14:32:38', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:38', '2016-01-18 14:32:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:38', '2016-01-18 14:32:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:38', '2016-01-18 14:32:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:38', '2016-01-18 14:32:38', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:38', '2016-01-18 14:32:38', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-01-18 14:32:38.615846"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:38.627566"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-01-18 14:32:38.632448"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:38.638153"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:38.644767"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-01-18 14:32:38.650074"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 5a970c66-a44f-4312-b299-a477bcc795cc) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 5a970c66-a44f-4312-b299-a477bcc795cc\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-01-18 14:32:38.799837"], ["created_at", "2016-01-18 14:32:38.800439"], ["updated_at", "2016-01-18 14:32:38.800439"]] [ActiveJob]  (1.0ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:38.804923"], ["id", 14225656]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:39.039588"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.0ms) commit transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction  (0.1ms) commit transaction  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:40', '2016-01-18 14:32:40', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:40', '2016-01-18 14:32:40', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:40', '2016-01-18 14:32:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:40', '2016-01-18 14:32:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:40', '2016-01-18 14:32:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:40', '2016-01-18 14:32:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:40', '2016-01-18 14:32:40', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c559060d-3c86-4964-9393-746ea1b3c202] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c559060d-3c86-4964-9393-746ea1b3c202] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 27.12ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-01-18 14:32:41.139730"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-01-18 14:32:41.425632"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2af1c95e-03c2-4e50-a934-4dc37f1a6ebe] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 497.04ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:41', '2016-01-18 14:32:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:41', '2016-01-18 14:32:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 27ms (Views: 3.5ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f4ceb15a18ae512fc20488081cbdf593"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "f4ceb15a18ae512fc20488081cbdf593"], ["created_at", "2016-01-18 14:32:41.663516"], ["updated_at", "2016-01-18 14:32:41.663516"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-01-18 14:32:41.671664"], ["updated_at", "2016-01-18 14:32:41.671664"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-01-18 14:32:41.699978"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:41.762369"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 14ms (Views: 3.3ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:41', '2016-01-18 14:32:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:41', '2016-01-18 14:32:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:41', '2016-01-18 14:32:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:41', '2016-01-18 14:32:41', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "84f77d4fbe99cd05466c6b943c6ad0bf"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["extension", "png"], ["content_type", "image/png"], ["uploading", "t"], ["token", "84f77d4fbe99cd05466c6b943c6ad0bf"], ["created_at", "2016-01-18 14:32:41.966137"], ["updated_at", "2016-01-18 14:32:41.966137"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 9ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-01-18 14:32:42.002525"], ["updated_at", "2016-01-18 14:32:42.002525"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-01-18 14:32:42.006863"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-01-18 14:32:42.011552"], ["updated_at", "2016-01-18 14:32:42.011552"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:32:42.014091"], ["updated_at", "2016-01-18 14:32:42.014091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "54e59026b35e6ccdef5e2e7e986d25e5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "54e59026b35e6ccdef5e2e7e986d25e5"], ["created_at", "2016-01-18 14:32:42.018303"], ["updated_at", "2016-01-18 14:32:42.018303"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5d0d30170526bdddeb8cd6172f0459b1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5d0d30170526bdddeb8cd6172f0459b1"], ["created_at", "2016-01-18 14:32:42.021770"], ["updated_at", "2016-01-18 14:32:42.021770"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0dc1bbb8902b6201855e2df183233974"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0dc1bbb8902b6201855e2df183233974"], ["created_at", "2016-01-18 14:32:42.026948"], ["updated_at", "2016-01-18 14:32:42.026948"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "da4243675a6daca543cb4da2b3865d22"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "da4243675a6daca543cb4da2b3865d22"], ["created_at", "2016-01-18 14:32:42.029426"], ["updated_at", "2016-01-18 14:32:42.029426"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f229c16ffecbab2048add61cfd58641d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f229c16ffecbab2048add61cfd58641d"], ["created_at", "2016-01-18 14:32:42.033283"], ["updated_at", "2016-01-18 14:32:42.033283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-01-18 14:32:42.040347"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-01-18 14:32:42.135991"], ["id", 335514824]]  (0.7ms) commit transaction  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-01-18 14:32:42', '2016-01-18 14:32:42', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-01-18 14:32:42', '2016-01-18 14:32:42', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:42', '2016-01-18 14:32:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:42', '2016-01-18 14:32:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:42', '2016-01-18 14:32:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-01-18 14:32:42', '2016-01-18 14:32:42', 779853880, 245026679, 431685987) Fixture Delete (0.6ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-01-18 14:32:42', '2016-01-18 14:32:42', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-01-18 14:32:42.306555"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:32:42.313543"], ["updated_at", "2016-01-18 14:32:42.313543"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-01-18 14:32:42.321343"], ["updated_at", "2016-01-18 14:32:42.321343"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-01-18 14:32:42.322573"], ["updated_at", "2016-01-18 14:32:42.322573"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-01-18 14:32:42.323786"], ["updated_at", "2016-01-18 14:32:42.323786"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:32:38', '2016-05-09 10:32:38', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:32:38', '2016-05-09 10:32:38', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:38', '2016-05-09 10:32:38', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:38', '2016-05-09 10:32:38', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:38', '2016-05-09 10:32:38', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:38', '2016-05-09 10:32:38', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:32:38', '2016-05-09 10:32:38', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 2d6eae36-d9bd-45f7-8c4b-8dfc227ceca8) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (1.2ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 2d6eae36-d9bd-45f7-8c4b-8dfc227ceca8\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 10:32:38.730191"], ["created_at", "2016-05-09 10:32:38.730705"], ["updated_at", "2016-05-09 10:32:38.730705"]] [ActiveJob]  (0.8ms) commit transaction  (0.0ms) begin transaction SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 10:32:38.735713"], ["id", 14225656]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 10:32:38.979335"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction  (0.1ms) commit transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:32:51', '2016-05-09 10:32:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:32:51', '2016-05-09 10:32:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:51', '2016-05-09 10:32:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:51', '2016-05-09 10:32:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:51', '2016-05-09 10:32:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:32:51', '2016-05-09 10:32:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:32:51', '2016-05-09 10:32:51', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [90358014-bd25-44ea-87ac-d7f8085fb0ac] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [90358014-bd25-44ea-87ac-d7f8085fb0ac] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1.89ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a2fb0e08-6bc3-474e-8264-7e807900ea34] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a2fb0e08-6bc3-474e-8264-7e807900ea34] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1.4ms ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:40:42', '2016-05-09 10:40:42', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:40:42', '2016-05-09 10:40:42', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:40:42', '2016-05-09 10:40:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:40:42', '2016-05-09 10:40:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:40:42', '2016-05-09 10:40:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:40:42', '2016-05-09 10:40:42', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:40:42', '2016-05-09 10:40:42', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [472502ba-65ec-4ea3-852c-5faf3a3e9226] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [472502ba-65ec-4ea3-852c-5faf3a3e9226] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.44ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2d6d7581-7a07-4813-b1d8-df3445a26d27] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2d6d7581-7a07-4813-b1d8-df3445a26d27] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 22428.9ms ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.6ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:42:09', '2016-05-09 10:42:09', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:42:09', '2016-05-09 10:42:09', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 153115190) Fixture Delete (1.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:09', '2016-05-09 10:42:09', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:09', '2016-05-09 10:42:09', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:09', '2016-05-09 10:42:09', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:09', '2016-05-09 10:42:09', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:42:09', '2016-05-09 10:42:09', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [12c0f8e0-f4f2-4123-80ab-d0cb49cd9e77] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [12c0f8e0-f4f2-4123-80ab-d0cb49cd9e77] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.59ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [30151499-b971-4bc4-ae92-1f6f36fe14f8] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [30151499-b971-4bc4-ae92-1f6f36fe14f8] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.99ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:42:41', '2016-05-09 10:42:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:42:41', '2016-05-09 10:42:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:41', '2016-05-09 10:42:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:41', '2016-05-09 10:42:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:41', '2016-05-09 10:42:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:42:41', '2016-05-09 10:42:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:42:41', '2016-05-09 10:42:41', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fc5633a8-4b0f-469b-8ba8-164b20f78822] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fc5633a8-4b0f-469b-8ba8-164b20f78822] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.66ms ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:43:12', '2016-05-09 10:43:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:43:12', '2016-05-09 10:43:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:43:12', '2016-05-09 10:43:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:43:12', '2016-05-09 10:43:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:43:12', '2016-05-09 10:43:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:43:12', '2016-05-09 10:43:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:43:12', '2016-05-09 10:43:12', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6f7f7d10-ebe1-4a1e-b90c-cc8121fd2e66] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6f7f7d10-ebe1-4a1e-b90c-cc8121fd2e66] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 4552.19ms ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:45:15', '2016-05-09 10:45:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:45:15', '2016-05-09 10:45:15', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:45:15', '2016-05-09 10:45:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:45:15', '2016-05-09 10:45:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:45:15', '2016-05-09 10:45:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:45:15', '2016-05-09 10:45:15', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:45:15', '2016-05-09 10:45:15', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f52b7fd2-405f-4db6-afc9-27b8622ce6c9] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f52b7fd2-405f-4db6-afc9-27b8622ce6c9] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1527.09ms ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 620280917) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 433078596) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:46:18', '2016-05-09 10:46:18', 538821867) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:46:18', '2016-05-09 10:46:18', 731805050) Fixture Delete (0.9ms) DELETE FROM "images" Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 153115190) Fixture Delete (2.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:18', '2016-05-09 10:46:18', 419883833, 624739301, 701625837) Fixture Insert (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:18', '2016-05-09 10:46:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:18', '2016-05-09 10:46:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:18', '2016-05-09 10:46:18', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:46:18', '2016-05-09 10:46:18', 948421225)  (1.2ms) commit transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 10:46:26.133191"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173] SQL (32.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 10:46:31.697547"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6d54fc31-fa3f-46ad-8c56-b823e830b173] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 13476.43ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:46:41', '2016-05-09 10:46:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:46:41', '2016-05-09 10:46:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:41', '2016-05-09 10:46:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:41', '2016-05-09 10:46:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:41', '2016-05-09 10:46:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:46:41', '2016-05-09 10:46:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:46:41', '2016-05-09 10:46:41', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1b4ce9c3-7e29-4b5f-ab91-2489d11d0716] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [1b4ce9c3-7e29-4b5f-ab91-2489d11d0716] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.81ms  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784628b4-6b7c-43dc-b64e-f2c40d77a804] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784628b4-6b7c-43dc-b64e-f2c40d77a804]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784628b4-6b7c-43dc-b64e-f2c40d77a804] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 10:46:50.521532"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784628b4-6b7c-43dc-b64e-f2c40d77a804]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [784628b4-6b7c-43dc-b64e-f2c40d77a804] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 16381.4ms ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 431685987) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:47:03', '2016-05-09 10:47:03', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:47:03', '2016-05-09 10:47:03', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:03', '2016-05-09 10:47:03', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:03', '2016-05-09 10:47:03', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:03', '2016-05-09 10:47:03', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:03', '2016-05-09 10:47:03', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:47:03', '2016-05-09 10:47:03', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bd7a88a8-9d54-4246-af23-6618238a6888] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bd7a88a8-9d54-4246-af23-6618238a6888] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.7ms  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 10:47:04.741413"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 10:47:05.111453"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461]  (1.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d298a1c1-e3ec-42f6-8615-4d2138b19461] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 708.45ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:47:14', '2016-05-09 10:47:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:47:14', '2016-05-09 10:47:14', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:14', '2016-05-09 10:47:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:14', '2016-05-09 10:47:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:14', '2016-05-09 10:47:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:47:14', '2016-05-09 10:47:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:47:14', '2016-05-09 10:47:14', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [567937f0-32f2-430f-bb58-0d61ba021a06] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [567937f0-32f2-430f-bb58-0d61ba021a06] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.56ms ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:48:06', '2016-05-09 10:48:06', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:48:06', '2016-05-09 10:48:06', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:06', '2016-05-09 10:48:06', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:06', '2016-05-09 10:48:06', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:06', '2016-05-09 10:48:06', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:06', '2016-05-09 10:48:06', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:48:06', '2016-05-09 10:48:06', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27ac44e3-e78a-453c-88e3-9ff4c4dad288] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27ac44e3-e78a-453c-88e3-9ff4c4dad288] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.75ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:48:50', '2016-05-09 10:48:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:48:50', '2016-05-09 10:48:50', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:50', '2016-05-09 10:48:50', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:50', '2016-05-09 10:48:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:50', '2016-05-09 10:48:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:48:50', '2016-05-09 10:48:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:48:50', '2016-05-09 10:48:50', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [971c60e0-0434-4275-ab55-738a0053096c] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [971c60e0-0434-4275-ab55-738a0053096c] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.76ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 335514824) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:49:12', '2016-05-09 10:49:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:49:12', '2016-05-09 10:49:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:12', '2016-05-09 10:49:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:12', '2016-05-09 10:49:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:12', '2016-05-09 10:49:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:12', '2016-05-09 10:49:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:49:12', '2016-05-09 10:49:12', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8240aa54-b59b-4384-900e-51c56dda37cf] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8240aa54-b59b-4384-900e-51c56dda37cf] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.93ms ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:49:21', '2016-05-09 10:49:21', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:49:21', '2016-05-09 10:49:21', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:21', '2016-05-09 10:49:21', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:21', '2016-05-09 10:49:21', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:21', '2016-05-09 10:49:21', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:21', '2016-05-09 10:49:21', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:49:21', '2016-05-09 10:49:21', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ec431781-62ef-48cd-9987-56b892663335] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [ec431781-62ef-48cd-9987-56b892663335] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.25ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 10:49:27.516001"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 10:49:32.449215"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448]  (2.5ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [63e9b876-06b1-4e8d-8af8-901c93ce4448] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 10126.1ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:49:40', '2016-05-09 10:49:40', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:49:40', '2016-05-09 10:49:40', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:40', '2016-05-09 10:49:40', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:40', '2016-05-09 10:49:40', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:40', '2016-05-09 10:49:40', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:40', '2016-05-09 10:49:40', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:49:40', '2016-05-09 10:49:40', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.8ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 10:49:40.861594"], ["updated_at", "2016-05-09 10:49:40.861594"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 10:49:40.866353"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 10:49:40.878514"], ["updated_at", "2016-05-09 10:49:40.878514"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 10:49:40.880946"], ["updated_at", "2016-05-09 10:49:40.880946"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 10:49:40.909399"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 10:49:40.914444"], ["updated_at", "2016-05-09 10:49:40.914444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 10:49:40.920185"], ["updated_at", "2016-05-09 10:49:40.920185"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 10:49:40.921555"], ["updated_at", "2016-05-09 10:49:40.921555"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 10:49:40.922836"], ["updated_at", "2016-05-09 10:49:40.922836"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8304bf5717ac78a5d9c63d406c593219"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8304bf5717ac78a5d9c63d406c593219"], ["created_at", "2016-05-09 10:49:40.927514"], ["updated_at", "2016-05-09 10:49:40.927514"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "299e7bcaddfde1c3be74300118485f12"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "299e7bcaddfde1c3be74300118485f12"], ["created_at", "2016-05-09 10:49:40.930174"], ["updated_at", "2016-05-09 10:49:40.930174"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "26a7ba2ca377005d542e436a3b1a205f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "26a7ba2ca377005d542e436a3b1a205f"], ["created_at", "2016-05-09 10:49:40.935410"], ["updated_at", "2016-05-09 10:49:40.935410"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "28292d02d50fec9eb239258df829c594"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "28292d02d50fec9eb239258df829c594"], ["created_at", "2016-05-09 10:49:40.938149"], ["updated_at", "2016-05-09 10:49:40.938149"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7b33b548adf34c356deea9448e5dc9e7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7b33b548adf34c356deea9448e5dc9e7"], ["created_at", "2016-05-09 10:49:40.941702"], ["updated_at", "2016-05-09 10:49:40.941702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 10:49:40.949063"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 10:49:41.078981"], ["id", 335514824]]  (0.8ms) commit transaction  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:49:41', '2016-05-09 10:49:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:49:41', '2016-05-09 10:49:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 153115190) Fixture Delete (1.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:41', '2016-05-09 10:49:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:41', '2016-05-09 10:49:41', 849405871, 624739301, 819504217) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:41', '2016-05-09 10:49:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:41', '2016-05-09 10:49:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:49:41', '2016-05-09 10:49:41', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 0be5061f-ed7e-4f4b-8077-272a08ed9050) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.0ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 0be5061f-ed7e-4f4b-8077-272a08ed9050\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 10:49:41.476595"], ["created_at", "2016-05-09 10:49:41.476974"], ["updated_at", "2016-05-09 10:49:41.476974"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 10:49:41.482023"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) begin transaction SQL (2.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 10:49:41.816472"], ["id", 1039265257]]  (1.1ms) commit transaction  (1.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.9ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 335514824) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:49:43', '2016-05-09 10:49:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:49:43', '2016-05-09 10:49:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:43', '2016-05-09 10:49:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:43', '2016-05-09 10:49:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:43', '2016-05-09 10:49:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:49:43', '2016-05-09 10:49:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:49:43', '2016-05-09 10:49:43', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f063d9d3-533b-451e-94af-f351e860ca11] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f063d9d3-533b-451e-94af-f351e860ca11] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.21ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 10:49:53.223240"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 10:50:01.284228"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268]  (1.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [60caf9cf-387c-42f5-9c12-8d873f8d5268] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 16946.86ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.6ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:50:01', '2016-05-09 10:50:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:50:01', '2016-05-09 10:50:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 10:50:01.506245"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 10:50:01.511618"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 10:50:01.516700"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 10:50:01.524435"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 10:50:01.530453"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "211bd9757dfa278be2c55734e22dede3"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "211bd9757dfa278be2c55734e22dede3"], ["created_at", "2016-05-09 10:50:01.540147"], ["updated_at", "2016-05-09 10:50:01.540147"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 10:50:01.579358"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 10:50:01.594234"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 10:50:01.661137"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 17ms (Views: 4.1ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 10:50:01', '2016-05-09 10:50:01', 538821867) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 10:50:01', '2016-05-09 10:50:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 10:50:01', '2016-05-09 10:50:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 10:50:01', '2016-05-09 10:50:01', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 18ms (Views: 4.6ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "88e7030dc8b642d361fca4ea0a8f4c6c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "88e7030dc8b642d361fca4ea0a8f4c6c"], ["created_at", "2016-05-09 10:50:01.948470"], ["updated_at", "2016-05-09 10:50:01.948470"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 10:50:01.952025"], ["updated_at", "2016-05-09 10:50:01.952025"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 4.6ms | ActiveRecord: 0.5ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:36:01', '2016-05-09 12:36:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:36:01', '2016-05-09 12:36:01', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:01', '2016-05-09 12:36:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:01', '2016-05-09 12:36:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:01', '2016-05-09 12:36:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:01', '2016-05-09 12:36:01', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:36:01', '2016-05-09 12:36:01', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [410c4504-2b56-4a8f-a296-3af700a9a56c] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [410c4504-2b56-4a8f-a296-3af700a9a56c] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.37ms  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 12:36:05.563381"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30]  (1.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 12:36:08.368255"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30]  (1.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2334c613-3da1-40e3-bae0-d646a1ee4c30] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 6096.86ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.4ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:36:08', '2016-05-09 12:36:08', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:36:08', '2016-05-09 12:36:08', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:08', '2016-05-09 12:36:08', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:08', '2016-05-09 12:36:08', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:08', '2016-05-09 12:36:08', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:08', '2016-05-09 12:36:08', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:36:08', '2016-05-09 12:36:08', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:36:08.593713"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 12:36:08.607161"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (ActiveRecord: 1.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:36:08.617110"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:36:08.624280"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:36:08.629855"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 12:36:08.648974"], ["updated_at", "2016-05-09 12:36:08.648974"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:36:08.658062"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 12:36:08.674991"], ["updated_at", "2016-05-09 12:36:08.674991"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:36:08.677959"], ["updated_at", "2016-05-09 12:36:08.677959"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:36:08.711009"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:36:08.716581"], ["updated_at", "2016-05-09 12:36:08.716581"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:36:08.722528"], ["updated_at", "2016-05-09 12:36:08.722528"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 12:36:08.723975"], ["updated_at", "2016-05-09 12:36:08.723975"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 12:36:08.725167"], ["updated_at", "2016-05-09 12:36:08.725167"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: b0215bf7-7505-4aff-9b1a-1328bd1e3327) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.8ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: b0215bf7-7505-4aff-9b1a-1328bd1e3327\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 12:36:08.867767"], ["created_at", "2016-05-09 12:36:08.868187"], ["updated_at", "2016-05-09 12:36:08.868187"]] [ActiveJob]  (0.7ms) commit transaction  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 12:36:08.872654"], ["id", 14225656]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:36:09.160024"], ["id", 1039265257]]  (0.7ms) commit transaction  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) begin transaction  (0.1ms) commit transaction  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.8ms) begin transaction  (0.2ms) commit transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:36:11', '2016-05-09 12:36:11', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:36:11', '2016-05-09 12:36:11', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 419883833, 624739301, 701625837) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:36:11.312053"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 12ms (Views: 2.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ Fogged::Resource Load (2.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:36:11.393701"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.2ms) commit transaction Completed 200 OK in 16ms (Views: 5.2ms | ActiveRecord: 1.6ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:36:11', '2016-05-09 12:36:11', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:36:11', '2016-05-09 12:36:11', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:11', '2016-05-09 12:36:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:36:11', '2016-05-09 12:36:11', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 20ms (Views: 5.5ms | ActiveRecord: 0.6ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.8ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ee84ba6c297d600d94e15a03b080468c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "ee84ba6c297d600d94e15a03b080468c"], ["created_at", "2016-05-09 12:36:11.684667"], ["updated_at", "2016-05-09 12:36:11.684667"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 12:36:11.688605"], ["updated_at", "2016-05-09 12:36:11.688605"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.5ms | ActiveRecord: 0.5ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 11ms (Views: 5.4ms | ActiveRecord: 0.6ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 12:36:11.748386"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 3.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b170c2282a90933a87f81535204c1447"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b170c2282a90933a87f81535204c1447"], ["created_at", "2016-05-09 12:36:11.821190"], ["updated_at", "2016-05-09 12:36:11.821190"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b632e866288517c005ccf7fffaafef4f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b632e866288517c005ccf7fffaafef4f"], ["created_at", "2016-05-09 12:36:11.824705"], ["updated_at", "2016-05-09 12:36:11.824705"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a6c37f338e186687f4718a8c7fc1267f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a6c37f338e186687f4718a8c7fc1267f"], ["created_at", "2016-05-09 12:36:11.829961"], ["updated_at", "2016-05-09 12:36:11.829961"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9179b907513c28b5d88b129925a4f456"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9179b907513c28b5d88b129925a4f456"], ["created_at", "2016-05-09 12:36:11.833278"], ["updated_at", "2016-05-09 12:36:11.833278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "668865965f3f024d33eac6ffb5b5430e"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "668865965f3f024d33eac6ffb5b5430e"], ["created_at", "2016-05-09 12:36:11.841195"], ["updated_at", "2016-05-09 12:36:11.841195"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:36:11.858188"], ["id", 785871319]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.4ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:36:11.967806"], ["id", 335514824]]  (0.6ms) commit transaction  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:36:12', '2016-05-09 12:36:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:36:12', '2016-05-09 12:36:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:12', '2016-05-09 12:36:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:12', '2016-05-09 12:36:12', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:12', '2016-05-09 12:36:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:36:12', '2016-05-09 12:36:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:36:12', '2016-05-09 12:36:12', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9dbd04b5150ea1309a4485e6877faa23"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "9dbd04b5150ea1309a4485e6877faa23"], ["created_at", "2016-05-09 12:36:12.180620"], ["updated_at", "2016-05-09 12:36:12.180620"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.4ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:39:34', '2016-05-09 12:39:34', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:39:34', '2016-05-09 12:39:34', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:39:34', '2016-05-09 12:39:34', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:39:34', '2016-05-09 12:39:34', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:39:34', '2016-05-09 12:39:34', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:39:34', '2016-05-09 12:39:34', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:39:34', '2016-05-09 12:39:34', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0a05d32a47b128f1e07150cbec3a064e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0a05d32a47b128f1e07150cbec3a064e"], ["created_at", "2016-05-09 12:39:34.673985"], ["updated_at", "2016-05-09 12:39:34.673985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a49eee3d05feff3a850d0934627f4929"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a49eee3d05feff3a850d0934627f4929"], ["created_at", "2016-05-09 12:39:34.677340"], ["updated_at", "2016-05-09 12:39:34.677340"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5c3c1c5c11b7a9ef2360b79fbb4e7546"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5c3c1c5c11b7a9ef2360b79fbb4e7546"], ["created_at", "2016-05-09 12:39:34.681905"], ["updated_at", "2016-05-09 12:39:34.681905"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b8e4e7cb214f59df9e62aad44fc3dbd5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b8e4e7cb214f59df9e62aad44fc3dbd5"], ["created_at", "2016-05-09 12:39:34.684611"], ["updated_at", "2016-05-09 12:39:34.684611"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e4d9c33c6ef679f227a62e13e1a08764"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e4d9c33c6ef679f227a62e13e1a08764"], ["created_at", "2016-05-09 12:39:34.689957"], ["updated_at", "2016-05-09 12:39:34.689957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:39:34.704326"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:39:34.809442"], ["id", 335514824]]  (0.8ms) commit transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 517391740) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:51:44', '2016-05-09 12:51:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:51:44', '2016-05-09 12:51:44', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 153115190) Fixture Delete (1.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:51:44', '2016-05-09 12:51:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:51:44', '2016-05-09 12:51:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:51:44', '2016-05-09 12:51:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:51:44', '2016-05-09 12:51:44', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:51:44', '2016-05-09 12:51:44', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "528a536d8d89768cba115ad81fc414ed"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "528a536d8d89768cba115ad81fc414ed"], ["created_at", "2016-05-09 12:51:44.777590"], ["updated_at", "2016-05-09 12:51:44.777590"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a3aca4a73b77e9241222a8d421f5d529"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a3aca4a73b77e9241222a8d421f5d529"], ["created_at", "2016-05-09 12:51:44.781316"], ["updated_at", "2016-05-09 12:51:44.781316"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0b387365672feb1afc092cbab1ec7e65"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0b387365672feb1afc092cbab1ec7e65"], ["created_at", "2016-05-09 12:51:44.786179"], ["updated_at", "2016-05-09 12:51:44.786179"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dd81b2c910c61b7ae0e7e8a400d38e7f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dd81b2c910c61b7ae0e7e8a400d38e7f"], ["created_at", "2016-05-09 12:51:44.788795"], ["updated_at", "2016-05-09 12:51:44.788795"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fa53e377686e0a278abadac31d10f7e5"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fa53e377686e0a278abadac31d10f7e5"], ["created_at", "2016-05-09 12:51:44.794577"], ["updated_at", "2016-05-09 12:51:44.794577"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:51:44.810938"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 515736925) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:52:07', '2016-05-09 12:52:07', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:52:07', '2016-05-09 12:52:07', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:52:07', '2016-05-09 12:52:07', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:52:07', '2016-05-09 12:52:07', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:52:07', '2016-05-09 12:52:07', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:52:07', '2016-05-09 12:52:07', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:52:07', '2016-05-09 12:52:07', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c2a4e80b5aa4ca80dff48a12030a472a"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c2a4e80b5aa4ca80dff48a12030a472a"], ["created_at", "2016-05-09 12:52:07.821890"], ["updated_at", "2016-05-09 12:52:07.821890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "941a3e4f55229db11df4a82ae811c6f4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "941a3e4f55229db11df4a82ae811c6f4"], ["created_at", "2016-05-09 12:52:07.827055"], ["updated_at", "2016-05-09 12:52:07.827055"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b9888d5380af1c33a1e16702dba5e76c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b9888d5380af1c33a1e16702dba5e76c"], ["created_at", "2016-05-09 12:52:07.835517"], ["updated_at", "2016-05-09 12:52:07.835517"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7e96814e28cb32e90c8032637d15779f"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7e96814e28cb32e90c8032637d15779f"], ["created_at", "2016-05-09 12:52:07.839002"], ["updated_at", "2016-05-09 12:52:07.839002"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "44bcf493a6e18b26bb7bed53b774d56b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "44bcf493a6e18b26bb7bed53b774d56b"], ["created_at", "2016-05-09 12:52:07.845073"], ["updated_at", "2016-05-09 12:52:07.845073"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:52:07.862191"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47211  (0.2ms) rollback transaction spawn> child PID = 47212 Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:52:07.973141"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[47212] took 0.092964 sec ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:53:01', '2016-05-09 12:53:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:53:01', '2016-05-09 12:53:01', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:01', '2016-05-09 12:53:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:01', '2016-05-09 12:53:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:01', '2016-05-09 12:53:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:01', '2016-05-09 12:53:01', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:53:01', '2016-05-09 12:53:01', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:53:01.493185"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:53:01.508389"], ["updated_at", "2016-05-09 12:53:01.508389"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:53:01.514026"], ["updated_at", "2016-05-09 12:53:01.514026"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 12:53:01.515089"], ["updated_at", "2016-05-09 12:53:01.515089"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 12:53:01.516137"], ["updated_at", "2016-05-09 12:53:01.516137"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "59e40f8e0652e300c5ac7e48c66bcce4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "59e40f8e0652e300c5ac7e48c66bcce4"], ["created_at", "2016-05-09 12:53:01.527238"], ["updated_at", "2016-05-09 12:53:01.527238"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c497104103e193db6929296a1baa486b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c497104103e193db6929296a1baa486b"], ["created_at", "2016-05-09 12:53:01.531115"], ["updated_at", "2016-05-09 12:53:01.531115"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5e2b66f092c3e3e9f0972596dd398c52"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5e2b66f092c3e3e9f0972596dd398c52"], ["created_at", "2016-05-09 12:53:01.536444"], ["updated_at", "2016-05-09 12:53:01.536444"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fa4e6d571e4b021327832b9917f35f24"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fa4e6d571e4b021327832b9917f35f24"], ["created_at", "2016-05-09 12:53:01.539163"], ["updated_at", "2016-05-09 12:53:01.539163"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2048629c02878350078632dafcd7cd33"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2048629c02878350078632dafcd7cd33"], ["created_at", "2016-05-09 12:53:01.543168"], ["updated_at", "2016-05-09 12:53:01.543168"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:53:01.550611"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47230  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> child PID = 47231 Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:53:01.586250"], ["id", 785871319]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 17ms (Views: 4.0ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47230  (0.3ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> child PID = 47232 Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 12:53:01.642694"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 13ms (Views: 5.3ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:01.688408"], ["id", 335514824]]  (0.1ms) begin transaction Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 40ms (Views: 6.2ms | ActiveRecord: 0.9ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie ---------------------------------------------------------------------  (24.7ms) commit transaction  (0.1ms) begin transaction SQL (19.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:01.694931"], ["id", 335514824]]  (0.0ms) commit transaction Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 42ms (Views: 4.0ms | ActiveRecord: 25.7ms) Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name -----------------------------------------------------------------------------------------------  (13.2ms) commit transaction Fogged::Resource Load (7.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47231] took 0.156464 sec Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "05298a8fca99d9d3ae5d7e7ddb37414b"]] spawn> child[47232] took 0.114567 sec SQL (0.7ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "05298a8fca99d9d3ae5d7e7ddb37414b"], ["created_at", "2016-05-09 12:53:01.736142"], ["updated_at", "2016-05-09 12:53:01.736142"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 12:53:01.750960"], ["updated_at", "2016-05-09 12:53:01.750960"]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 9ms (Views: 4.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 12:53:01.800872"], ["updated_at", "2016-05-09 12:53:01.800872"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:53:01.805787"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 12:53:01.810411"], ["updated_at", "2016-05-09 12:53:01.810411"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:53:01.812893"], ["updated_at", "2016-05-09 12:53:01.812893"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47230  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47230  (0.4ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- spawn> child PID = 47233 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 spawn> child PID = 47234 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.6ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47230  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47230  (0.4ms) rollback transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47230  (0.5ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47230 spawn> child PID = 47235  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47230 spawn> child PID = 47236  (0.6ms) rollback transaction spawn> child PID = 47237  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> child PID = 47238 spawn> parent PID = 47230  (0.5ms) rollback transaction spawn> child PID = 47239  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- spawn> child[47239] took 0.010337 sec Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47230  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47230 spawn> child PID = 47240  (0.4ms) rollback transaction spawn> child PID = 47241 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e2e622af-31f9-4687-b3c4-e4b9a326f282] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 spawn> child[47241] took 0.009244 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e2e622af-31f9-4687-b3c4-e4b9a326f282] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 4.94ms spawn> child[47233] took 0.174688 sec spawn> child PID = 47242  (0.2ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1  (2.1ms) SELECT COUNT(*) FROM "delayed_jobs" SQL (1.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:53:02.045188"], ["id", 1039265257]]  (0.4ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (1.0ms) begin transaction  (0.1ms) SAVEPOINT active_record_1  (1.0ms) begin transaction SQL (1.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 12:53:02.071026"], ["id", 1039265257]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 20ms (ActiveRecord: 2.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (1.0ms) rollback transaction SQL (10.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:02.072379"], ["id", 1039265257]]  (0.3ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 50fb7c7b-7615-4092-845d-a1d7077be1eb) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.6ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47240] took 0.163095 sec [ActiveJob]  (0.1ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47242] took 0.128516 sec SQL (4939.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:02.071035"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) rollback transaction spawn> Exception in child[47237] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47237] took 5.116195 sec  (4941.4ms) commit transaction SQLite3::BusyException: database is locked: commit transaction Fogged::Resource Load (4931.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id --------------------------------------------------------------------------------------------------------------  (4.5ms) rollback transaction spawn> Exception in child[47236] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47236] took 5.146447 sec [ActiveJob] SQL (4907.9ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 50fb7c7b-7615-4092-845d-a1d7077be1eb\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 12:53:02.125024"], ["created_at", "2016-05-09 12:53:02.125472"], ["updated_at", "2016-05-09 12:53:02.125472"]] SQL (5033.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:02.103931"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) rollback transaction spawn> Exception in child[47238] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47238] took 5.236683 sec [ActiveJob]  (4931.7ms) commit transaction Fogged::Resource Load (4931.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] [ActiveJob] SQLite3::BusyException: database is locked: commit transaction SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1  (0.1ms) rollback transaction [ActiveJob]  (0.4ms) rollback transaction spawn> Exception in child[47235] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47235] took 10.089783 sec  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:53:11.971507"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 2ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (4.9ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "babc1282d7bbce4c397f87f712e09cb5"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "babc1282d7bbce4c397f87f712e09cb5"], ["created_at", "2016-05-09 12:53:11.994957"], ["updated_at", "2016-05-09 12:53:11.994957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.8ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.3ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 12:53:21.843166"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a]  (4931.4ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a]  (4.8ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6e742429-a160-4b41-b661-6049c7f4207a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 24778.29ms spawn> Exception in child[47234] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `new' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47234] took 24.94115 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:53:58', '2016-05-09 12:53:58', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:53:58', '2016-05-09 12:53:58', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:58', '2016-05-09 12:53:58', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:58', '2016-05-09 12:53:58', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:58', '2016-05-09 12:53:58', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:53:58', '2016-05-09 12:53:58', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:53:58', '2016-05-09 12:53:58', 948421225)  (5.2ms) commit transaction  (0.2ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "48c27b03b628beff79df6bcfcbb23efe"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "48c27b03b628beff79df6bcfcbb23efe"], ["created_at", "2016-05-09 12:53:58.466326"], ["updated_at", "2016-05-09 12:53:58.466326"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "df86d1dede0ae6cadd98b10c4b8f308a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "df86d1dede0ae6cadd98b10c4b8f308a"], ["created_at", "2016-05-09 12:53:58.469295"], ["updated_at", "2016-05-09 12:53:58.469295"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "260231b4f5b09caf053fe4f9ab4d66ad"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "260231b4f5b09caf053fe4f9ab4d66ad"], ["created_at", "2016-05-09 12:53:58.473755"], ["updated_at", "2016-05-09 12:53:58.473755"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "892681f54e742f27d5564a5030014133"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "892681f54e742f27d5564a5030014133"], ["created_at", "2016-05-09 12:53:58.476204"], ["updated_at", "2016-05-09 12:53:58.476204"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9ae7da9808f5f32df15f8bd1fa8581ac"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9ae7da9808f5f32df15f8bd1fa8581ac"], ["created_at", "2016-05-09 12:53:58.481071"], ["updated_at", "2016-05-09 12:53:58.481071"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:53:58.495680"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47261  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child PID = 47262 Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47261  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47261  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47261  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47261 spawn> child PID = 47263  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47261  (0.4ms) rollback transaction spawn> child PID = 47264  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47261 spawn> child PID = 47265  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47261 spawn> child PID = 47266 spawn> child PID = 47267 spawn> child[47267] took 0.008666 sec  (1.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47261 spawn> child PID = 47268  (0.4ms) rollback transaction spawn> child PID = 47269  (0.2ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child[47269] took 0.01113 sec Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3dffa0ec5db4236ab62db0631865dd1a"]] spawn> child PID = 47270 SQL (0.6ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "3dffa0ec5db4236ab62db0631865dd1a"], ["created_at", "2016-05-09 12:53:58.633911"], ["updated_at", "2016-05-09 12:53:58.633911"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) begin transaction Completed 200 OK in 24ms (Views: 5.6ms | ActiveRecord: 1.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction SQL (17.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:58.641686"], ["id", 335514824]]  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (2.8ms) commit transaction spawn> child[47262] took 0.148766 sec  (5.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.4ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 3ms (ActiveRecord: 0.0ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (1.3ms) begin transaction  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 32ms (ActiveRecord: 0.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML  (3.2ms) begin transaction Completed 400 Bad Request in 17ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (7.6ms) begin transaction SQL (1.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:58.749939"], ["id", 1039265257]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47268] took 0.216505 sec  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47270] took 0.192958 sec [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: e8949564-e734-49a7-b6fe-549c855dff30) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction  (4932.8ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.6ms) rollback transaction spawn> Exception in child[47264] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47264] took 5.172687 sec Fogged::Resource Load (4919.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] [ActiveJob] SQL (4874.1ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: e8949564-e734-49a7-b6fe-549c855dff30\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 12:53:58.859492"], ["created_at", "2016-05-09 12:53:58.859911"], ["updated_at", "2016-05-09 12:53:58.859911"]] spawn> parent PID = 47261  (0.4ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- spawn> child PID = 47271 SQL (5030.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:58.807451"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? SQL (5028.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:53:58.790692"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) rollback transaction spawn> Exception in child[47266] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) rollback transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> Exception in child[47265] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47266] took 5.257951 sec spawn> child[47265] took 5.272227 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [38e2be67-36c8-4868-ad00-5404d5f2867a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [38e2be67-36c8-4868-ad00-5404d5f2867a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.83ms spawn> child[47271] took 0.120714 sec [ActiveJob]  (4929.0ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (1.1ms) rollback transaction spawn> Exception in child[47263] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47263] took 10.115437 sec Fogged::Resource Load (4923.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47261  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.2ms) spawn> child PID = 47273  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 5ms (Views: 4.5ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 5ms (Views: 3.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 12:54:08.756212"], ["updated_at", "2016-05-09 12:54:08.756212"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:54:08.763164"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 12:54:08.768685"], ["updated_at", "2016-05-09 12:54:08.768685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:54:08.772427"], ["updated_at", "2016-05-09 12:54:08.772427"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:54:08.780879"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.9ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47261  (0.3ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 3ms (ActiveRecord: 1.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> child PID = 47275  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:54:08.820762"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 12:54:08.830335"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (1.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:54:08.839730"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:54:08.851042"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:54:08.861480"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) begin transaction  (0.1ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Completed 200 OK in 16ms (Views: 6.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47275] took 0.067661 sec Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:54:08.914468"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:54:08.920884"], ["updated_at", "2016-05-09 12:54:08.920884"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:54:08.927360"], ["updated_at", "2016-05-09 12:54:08.927360"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 12:54:08.929260"], ["updated_at", "2016-05-09 12:54:08.929260"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 12:54:08.931067"], ["updated_at", "2016-05-09 12:54:08.931067"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 12:54:08.942491"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 15ms (Views: 3.7ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.3ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e253cbbe72a6f3707171af74c8fd9689"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "e253cbbe72a6f3707171af74c8fd9689"], ["created_at", "2016-05-09 12:54:08.984616"], ["updated_at", "2016-05-09 12:54:08.984616"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 12:54:08.987499"], ["updated_at", "2016-05-09 12:54:08.987499"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 12:54:13.391181"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783]  (4931.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783]  (0.7ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [35021975-703c-4e22-af8a-6b560f272783] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 9524.25ms spawn> Exception in child[47273] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `new' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47273] took 9.637195 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:55:22', '2016-05-09 12:55:22', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:55:22', '2016-05-09 12:55:22', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:55:22', '2016-05-09 12:55:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:55:22', '2016-05-09 12:55:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:55:22', '2016-05-09 12:55:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:55:22', '2016-05-09 12:55:22', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:55:22', '2016-05-09 12:55:22', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e1e44bd27734a339eeb7083f8474a153"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e1e44bd27734a339eeb7083f8474a153"], ["created_at", "2016-05-09 12:55:22.803443"], ["updated_at", "2016-05-09 12:55:22.803443"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ae1cf39d3de1555e24cc5bdd081ee154"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ae1cf39d3de1555e24cc5bdd081ee154"], ["created_at", "2016-05-09 12:55:22.806932"], ["updated_at", "2016-05-09 12:55:22.806932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1bab0fe104a02fe3cffad803973fd3ff"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1bab0fe104a02fe3cffad803973fd3ff"], ["created_at", "2016-05-09 12:55:22.812528"], ["updated_at", "2016-05-09 12:55:22.812528"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "696e417d2d2c7539dd75a38bf14ed484"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "696e417d2d2c7539dd75a38bf14ed484"], ["created_at", "2016-05-09 12:55:22.816126"], ["updated_at", "2016-05-09 12:55:22.816126"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e66907f75b7473a82002d980eb3cd91b"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e66907f75b7473a82002d980eb3cd91b"], ["created_at", "2016-05-09 12:55:22.820425"], ["updated_at", "2016-05-09 12:55:22.820425"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:55:22.836273"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47312  (0.2ms) rollback transaction  (1.9ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47312  (0.5ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- spawn> child PID = 47313 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47312  (1.2ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47312  (0.4ms) rollback transaction spawn> child PID = 47314  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (2.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47312 spawn> child PID = 47315  (0.6ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47312  (0.7ms) rollback transaction spawn> child PID = 47316  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47312  (0.5ms) rollback transaction spawn> child PID = 47317 spawn> child PID = 47318 spawn> child PID = 47319  (9.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47312  (0.7ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47312  (0.4ms) rollback transaction  (0.3ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47312 spawn> child PID = 47320  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder spawn> child[47320] took 0.007727 sec ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47312 spawn> child PID = 47321  (0.6ms) rollback transaction  (0.9ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- spawn> child PID = 47322 spawn> child[47322] took 0.00794 sec spawn> child PID = 47323 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Fogged::Resource Load (1.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:55:23.155389"], ["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [931b43b5-2cbf-4782-b3a0-86b474cf6fee] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [931b43b5-2cbf-4782-b3a0-86b474cf6fee] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 5.41ms spawn> child[47314] took 0.299738 sec SQL (0.6ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:55:23.179125"], ["id", 785871319]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 14ms (ActiveRecord: 1.6ms)  (0.2ms) rollback transaction  (29.7ms) commit transaction spawn> child[47313] took 0.329582 sec  (0.3ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47312  (0.8ms) rollback transaction  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 3ms (ActiveRecord: 0.5ms)  (0.1ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- spawn> child PID = 47324  (1.1ms) begin transaction  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) begin transaction  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47321] took 0.176982 sec  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" SQL (4.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:55:23.242998"], ["id", 1039265257]]  (0.7ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47323] took 0.159879 sec [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: d3f3547b-923c-4158-86fc-7c16fd026707) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964]  (0.6ms) begin transaction  (4933.6ms) commit transaction SQLite3::BusyException: database is locked: commit transaction SQL (4932.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:55:23.256487"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) rollback transaction spawn> Exception in child[47318] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' Fogged::Resource Load (4930.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1  (4.9ms) rollback transaction spawn> child[47318] took 5.21006 sec spawn> Exception in child[47317] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964] SQL (2364.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 12:55:25.835645"], ["id", 731805050]]  (0.2ms) rollback transaction spawn> child[47317] took 5.218785 sec Fogged::Resource Load (4918.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} SQL (5037.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:55:23.269392"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [ActiveJob] SQL (5006.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: d3f3547b-923c-4158-86fc-7c16fd026707\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 12:55:23.301522"], ["created_at", "2016-05-09 12:55:23.301951"], ["updated_at", "2016-05-09 12:55:23.301951"]] [ActiveJob] SQLite3::BusyException: database is locked: INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?)  (0.1ms) rollback transaction spawn> Exception in child[47319] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [ActiveJob]  (0.1ms) rollback transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> Exception in child[47316] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:76:in `exec_insert' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:108:in `insert' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `insert' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:64:in `insert' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:522:in `_create_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/counter_cache.rb:139:in `_create_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:75:in `_create_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:131:in `_create_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:306:in `block in _create_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_create_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:306:in `_create_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:57:in `_create_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:120:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:37:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:21:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block (2 levels) in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47316] took 5.352005 sec spawn> child[47319] took 5.291922 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964]  (4930.6ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964] SQLite3::BusyException: database is locked: commit transaction Fogged::Resource Load (4932.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 Fogged::Resource Load (4925.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Completed 500 Internal Server Error in 4927ms (ActiveRecord: 4925.6ms) ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- spawn> Exception in child[47324] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:347:in `select' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/querying.rb:39:in `find_by_sql' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/statement_cache.rb:107:in `execute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/core.rb:153:in `find' /Users/david/projects/fogged/app/controllers/fogged/resources_controller.rb:242:in `select_resource' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:432:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:145:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:145:in `block in halting_and_conditional' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `block in call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `each' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:504:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_process_action_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/abstract_controller/callbacks.rb:19:in `process_action' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/metal/rescue.rb:29:in `process_action' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/abstract_controller/base.rb:137:in `process' /Users/david/.gem/ruby/2.2.2/gems/actionview-4.2.1/lib/action_view/rendering.rb:30:in `process' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/test_case.rb:632:in `process' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/test_case.rb:65:in `process' /Users/david/.gem/ruby/2.2.2/gems/active_model_serializers-0.9.3/lib/action_controller/serialization_test_case.rb:25:in `process' /Users/david/.gem/ruby/2.2.2/gems/actionpack-4.2.1/lib/action_controller/test_case.rb:526:in `put' /Users/david/projects/fogged/test/controllers/fogged/resources_controller/confirm_test.rb:29:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/controllers/fogged/resources_controller/confirm_test.rb:20:in `new' /Users/david/projects/fogged/test/controllers/fogged/resources_controller/confirm_test.rb:20:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964]  (4.7ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e8b0102-fece-4fa9-a398-a4e95141c964] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 9911.67ms spawn> Exception in child[47315] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `new' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] spawn> child[47324] took 9.909613 sec spawn> child[47315] took 10.221849 sec  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 12:55:33.158304"], ["updated_at", "2016-05-09 12:55:33.158304"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:55:33.161826"], ["updated_at", "2016-05-09 12:55:33.161826"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 37ms (Views: 4.4ms | ActiveRecord: 0.6ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.0ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1c5da237f8308c9f33d47ae726a25b58"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "1c5da237f8308c9f33d47ae726a25b58"], ["created_at", "2016-05-09 12:55:33.246710"], ["updated_at", "2016-05-09 12:55:33.246710"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 12:55:33.255848"], ["updated_at", "2016-05-09 12:55:33.255848"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:55:33.297946"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:55:33.306548"], ["updated_at", "2016-05-09 12:55:33.306548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:55:33.313147"], ["updated_at", "2016-05-09 12:55:33.313147"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 12:55:33.314312"], ["updated_at", "2016-05-09 12:55:33.314312"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 12:55:33.315489"], ["updated_at", "2016-05-09 12:55:33.315489"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0a4638b23e661b28052b576c661169ca"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "0a4638b23e661b28052b576c661169ca"], ["created_at", "2016-05-09 12:55:33.342694"], ["updated_at", "2016-05-09 12:55:33.342694"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:55:33.379621"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 12:55:33.384282"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:55:33.389003"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:55:33.395364"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:55:33.400934"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 12:55:33.413469"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 12:56:43', '2016-05-09 12:56:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 12:56:43', '2016-05-09 12:56:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:56:43', '2016-05-09 12:56:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:56:43', '2016-05-09 12:56:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:56:43', '2016-05-09 12:56:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 12:56:43', '2016-05-09 12:56:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 12:56:43', '2016-05-09 12:56:43', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47340  (0.3ms) rollback transaction  (0.7ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47340  (0.5ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47340  (0.4ms) rollback transaction  (0.9ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ spawn> child PID = 47341 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47340  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47340 spawn> child PID = 47342  (0.4ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- spawn> child PID = 47343 Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47340  (0.9ms) rollback transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- spawn> child PID = 47344 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47340  (0.5ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- spawn> child PID = 47345 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47340 spawn> child[47345] took 0.008598 sec spawn> child PID = 47346  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> child PID = 47347  (0.1ms) SAVEPOINT active_record_1 spawn> child[47347] took 0.005907 sec spawn> child PID = 47348 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:56:43.991390"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 12:56:44.019810"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.8ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:56:44.033074"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 5ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1  (0.6ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:56:44.052031"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload  (0.6ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 12:56:44.064894"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:56:44.059997"], ["id", 1039265257]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) rollback transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Completed 200 OK in 2ms (ActiveRecord: 0.2ms) spawn> Exception in child[47342] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47342] took 0.14372 sec Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47346] took 0.103914 sec  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id --------------------------------------------------------------------------------------  (0.8ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:56:44.069902"], ["id", 1039265257]] Fogged::Resource Load (2.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 5e018168-388f-43d0-aad1-aea9e4bfc0a9) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:56:44.085181"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.4ms) rollback transaction spawn> Exception in child[47344] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47344] took 0.144422 sec  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47348] took 0.104991 sec [ActiveJob]  (0.1ms) begin transaction  (4928.6ms) commit transaction SQLite3::BusyException: database is locked: commit transaction Fogged::Resource Load (4924.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] SQLite3::BusyException: database is locked: SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1  (0.1ms) rollback transaction  (4.5ms) rollback transaction spawn> Exception in child[47343] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47343] took 5.078164 sec [ActiveJob] SQL (4900.3ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 5e018168-388f-43d0-aad1-aea9e4bfc0a9\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 12:56:44.113641"], ["created_at", "2016-05-09 12:56:44.114209"], ["updated_at", "2016-05-09 12:56:44.114209"]]  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (4922.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] [ActiveJob]  (4923.2ms) commit transaction SQLite3::BusyException: database is locked: SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [ActiveJob] SQLite3::BusyException: database is locked: commit transaction  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- [ActiveJob]  (4.5ms) rollback transaction spawn> Exception in child[47341] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `new' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' Movie Load (3.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] spawn> child[47341] took 10.024947 sec Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 37ms (Views: 3.3ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3e27fdbf107d9c18bc909b92d443a04c"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "3e27fdbf107d9c18bc909b92d443a04c"], ["created_at", "2016-05-09 12:56:54.001451"], ["updated_at", "2016-05-09 12:56:54.001451"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 12:56:54.012129"], ["updated_at", "2016-05-09 12:56:54.012129"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "95aaaddaf1f70656ca56c68ce3efe267"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "95aaaddaf1f70656ca56c68ce3efe267"], ["created_at", "2016-05-09 12:56:54.048041"], ["updated_at", "2016-05-09 12:56:54.048041"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cd213c1232436cf3471f141c90818d3f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cd213c1232436cf3471f141c90818d3f"], ["created_at", "2016-05-09 12:56:54.051924"], ["updated_at", "2016-05-09 12:56:54.051924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bee9adac26826484467b8d881f80ee85"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bee9adac26826484467b8d881f80ee85"], ["created_at", "2016-05-09 12:56:54.058728"], ["updated_at", "2016-05-09 12:56:54.058728"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9eaa3e920bcaceb0a8a74d1b6848e0c2"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9eaa3e920bcaceb0a8a74d1b6848e0c2"], ["created_at", "2016-05-09 12:56:54.063174"], ["updated_at", "2016-05-09 12:56:54.063174"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e0ada9ed79490238b4d290731fd90d50"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e0ada9ed79490238b4d290731fd90d50"], ["created_at", "2016-05-09 12:56:54.067550"], ["updated_at", "2016-05-09 12:56:54.067550"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:56:54.083414"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47340  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SAVEPOINT active_record_1 spawn> child PID = 47351 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 12:56:54.110436"], ["updated_at", "2016-05-09 12:56:54.110436"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:56:54.120669"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 12:56:54.127372"], ["updated_at", "2016-05-09 12:56:54.127372"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:56:54.133181"], ["updated_at", "2016-05-09 12:56:54.133181"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bc70a1929397723d25ca138fe756f587"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "bc70a1929397723d25ca138fe756f587"], ["created_at", "2016-05-09 12:56:54.145561"], ["updated_at", "2016-05-09 12:56:54.145561"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.9ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 12:56:54.190533"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47340 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 12:56:54.198944"], ["id", 335514824]]  (1.0ms) rollback transaction  (0.7ms) commit transaction  (0.1ms) begin transaction spawn> child[47351] took 0.095401 sec ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 3ms (ActiveRecord: 0.7ms)  (0.2ms) rollback transaction spawn> child PID = 47352  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 3ms (Views: 2.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47340 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image -----------------------------------------------------------------------  (0.1ms) begin transaction Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.1ms) commit transaction spawn> parent PID = 47340  (0.1ms) begin transaction  (0.1ms) commit transaction  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists -------------------------------------------- Completed 200 OK in 14ms (Views: 4.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.2ms) rollback transaction  (1.3ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ---------------------- spawn> child[47352] took 0.057897 sec  (0.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- spawn> child PID = 47353 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] spawn> child PID = 47354 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 12:56:54.304573"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (1.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:56:54.320620"], ["updated_at", "2016-05-09 12:56:54.320620"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 12:56:54.332027"], ["updated_at", "2016-05-09 12:56:54.332027"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 12:56:54.334241"], ["updated_at", "2016-05-09 12:56:54.334241"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 12:56:54.336993"], ["updated_at", "2016-05-09 12:56:54.336993"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 5ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a429f6bf-5162-4293-83af-4b425d074301] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a429f6bf-5162-4293-83af-4b425d074301] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.78ms spawn> child[47353] took 0.127078 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 12:56:57.796545"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83]  (4928.2ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83]  (4.8ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8831c23d-958c-4703-b3b5-d2188bb4ff83] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 8320.33ms spawn> Exception in child[47354] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `new' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47354] took 8.437876 sec ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 779853880, 245026679, 431685987) Fixture Delete (0.5ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:01:37.305564"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:01:37.315220"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:01:37.319700"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:01:37.325584"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:01:37.330846"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47435  (0.9ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47435 spawn> child PID = 47436 spawn> child PID = 47437  (0.8ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 624739301) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "db103b9269b8caf1af19fb03a19aab4c"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "db103b9269b8caf1af19fb03a19aab4c"], ["created_at", "2016-05-09 13:01:37.387161"], ["updated_at", "2016-05-09 13:01:37.387161"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2217a4ec07ac307a48382a35d9b32082"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2217a4ec07ac307a48382a35d9b32082"], ["created_at", "2016-05-09 13:01:37.393053"], ["updated_at", "2016-05-09 13:01:37.393053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1ac5ea9352f1da5e57001838b2bb0123"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1ac5ea9352f1da5e57001838b2bb0123"], ["created_at", "2016-05-09 13:01:37.401285"], ["updated_at", "2016-05-09 13:01:37.401285"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "76ecfafe67be68d75f3b437c9b11f969"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "76ecfafe67be68d75f3b437c9b11f969"], ["created_at", "2016-05-09 13:01:37.405666"], ["updated_at", "2016-05-09 13:01:37.405666"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e5555bb2b14f0fa891a55642419b6c29"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e5555bb2b14f0fa891a55642419b6c29"], ["created_at", "2016-05-09 13:01:37.412541"], ["updated_at", "2016-05-09 13:01:37.412541"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:01:37.435329"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47435 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [3d6f0b96-2fc5-479d-b9d2-b65f6bd8abd9] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [3d6f0b96-2fc5-479d-b9d2-b65f6bd8abd9] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.59ms spawn> child[47436] took 0.117554 sec spawn> child PID = 47438  (0.8ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 59ms (Views: 8.3ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies"  (0.2ms) begin transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:01:37.571760"], ["id", 335514824]]  (0.1ms) rollback transaction  (4.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- spawn> child[47438] took 0.109952 sec Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 3.0ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "80f5dadf63ef7b35e8c998d52f55bbdf"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "80f5dadf63ef7b35e8c998d52f55bbdf"], ["created_at", "2016-05-09 13:01:37.599555"], ["updated_at", "2016-05-09 13:01:37.599555"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 13:01:37.612723"], ["updated_at", "2016-05-09 13:01:37.612723"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.3ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:01:37.653650"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:01:37.659671"], ["updated_at", "2016-05-09 13:01:37.659671"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:01:37.667276"], ["updated_at", "2016-05-09 13:01:37.667276"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 13:01:37.669337"], ["updated_at", "2016-05-09 13:01:37.669337"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 13:01:37.670834"], ["updated_at", "2016-05-09 13:01:37.670834"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:01:37.680636"], ["updated_at", "2016-05-09 13:01:37.680636"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:01:37.685607"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:01:37.690698"], ["updated_at", "2016-05-09 13:01:37.690698"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:01:37.693963"], ["updated_at", "2016-05-09 13:01:37.693963"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47435  (1.2ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47435  (1.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47435 spawn> child PID = 47439  (0.8ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47435  (0.9ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- spawn> child PID = 47440 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47435 spawn> child PID = 47441  (0.9ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47435 spawn> child PID = 47442  (0.9ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47435  (1.2ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- spawn> child PID = 47443 Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47435 spawn> child[47443] took 0.008408 sec spawn> child PID = 47444 spawn> child PID = 47445  (0.8ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 517391740) spawn> child[47445] took 0.006979 sec Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 1039265257) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 433078596) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 785871319) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 538821867) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:01:37', '2016-05-09 13:01:37', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" spawn> child PID = 47446 Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 98413728, 245026679, 784085492) Fixture Insert (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:01:37', '2016-05-09 13:01:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:01:37', '2016-05-09 13:01:37', 948421225)  (4.6ms) commit transaction  (1.4ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dc3f62b6ac91d7b7865ac055d25af3b5"]] SQL (0.7ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "dc3f62b6ac91d7b7865ac055d25af3b5"], ["created_at", "2016-05-09 13:01:37.846584"], ["updated_at", "2016-05-09 13:01:37.846584"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (1.7ms) SELECT COUNT(*) FROM "delayed_jobs" Completed 200 OK in 17ms (Views: 6.8ms | ActiveRecord: 1.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (1.0ms) begin transaction Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.8ms) rollback transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:01:37.870336"], ["id", 1039265257]]  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (1.1ms) commit transaction  (1.5ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child[47440] took 0.15142 sec  (0.7ms) begin transaction Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 7d112b19-1551-4ada-a7dc-ef4cf65b01f0) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 6ms (ActiveRecord: 0.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:01:37.884632"], ["id", 1039265257]]  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.8ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child[47441] took 0.157108 sec Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" [ActiveJob]  (0.2ms) begin transaction Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}}  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) begin transaction Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction spawn> child[47444] took 0.131784 sec  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name ----------------------------------------------------------------------------------- [ActiveJob] SQL (1.0ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 7d112b19-1551-4ada-a7dc-ef4cf65b01f0\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:01:37.905231"], ["created_at", "2016-05-09 13:01:37.905869"], ["updated_at", "2016-05-09 13:01:37.905869"]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter ------------------------------------------------------------------------------------------------- [ActiveJob]  (7.7ms) commit transaction SQL (7.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:01:37.907268"], ["id", 1039265257]]  (0.1ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (3.8ms) commit transaction spawn> child[47442] took 0.177174 sec SQL (1.9ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:01:37.919210"], ["id", 14225656]]  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id --------------------------------------------------------------------------------------  (0.8ms) commit transaction Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47439] took 0.208021 sec  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} spawn> child[47446] took 0.128001 sec Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:01:37.937118"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.1ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 4ms (Views: 2.7ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) SAVEPOINT active_record_1 SQL (1.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:01:38.036305"], ["id", 785871319]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 23ms (Views: 4.2ms | ActiveRecord: 2.9ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47435  (3.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 3ms (ActiveRecord: 0.5ms)  (0.4ms) rollback transaction spawn> child PID = 47452 Fogged::Resource Load (3.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:01:38.186983"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 20ms (Views: 4.2ms | ActiveRecord: 1.9ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47452] took 0.104037 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:01:42.264982"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:01:43.965818"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a]  (0.6ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d7e57b67-eb5b-407c-beb1-367a502c374a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 6502.79ms Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47437] took 6.611453 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:11', '2016-05-09 13:02:11', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:11', '2016-05-09 13:02:11', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:11', '2016-05-09 13:02:11', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:11', '2016-05-09 13:02:11', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:11', '2016-05-09 13:02:11', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:11', '2016-05-09 13:02:11', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:11', '2016-05-09 13:02:11', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47467  (1.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47467  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47467 spawn> child PID = 47469  (1.4ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47467 spawn> child PID = 47470  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47467 spawn> child PID = 47471  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47467 spawn> child PID = 47472  (0.8ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47467 spawn> child PID = 47473  (2.8ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- spawn> child PID = 47474 spawn> child[47473] took 0.006503 sec Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47467 spawn> child PID = 47475 spawn> child[47475] took 0.016672 sec spawn> child PID = 47476  (0.7ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 183950720)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 937304175) Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 579229346) Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 419883833, 624739301, 701625837) Fixture Insert (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 948421225)  (1.4ms) commit transaction  (0.9ms) begin transaction  (2.0ms) begin transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47467  (0.7ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47467 SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:12.200334"], ["id", 1039265257]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? SQL (0.9ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:12.201307"], ["id", 1039265257]]  (0.1ms) rollback transaction spawn> Exception in child[47470] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `to_a' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:314:in `block in exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:293:in `exec_query' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:319:in `exec_delete' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:114:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/relation.rb:88:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:513:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/locking/optimistic.rb:79:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:127:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `block in _update_record' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:88:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_update_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:310:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/timestamp.rb:70:in `_update_record' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:502:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `block in create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_save_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/callbacks.rb:302:in `create_or_update' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:142:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/validations.rb:43:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/attribute_methods/dirty.rb:29:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `block in save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:211:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:291:in `save!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:264:in `block in update!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:347:in `block in with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:188:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:44:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:39:in `new' /Users/david/projects/fogged/test/test_helper.rb:39:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47470] took 0.162711 sec [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 07657bb5-146b-476e-9c81-65ec26e4a4fd) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656  (1.3ms) commit transaction  (1.4ms) begin transaction spawn> child[47471] took 0.155466 sec spawn> child PID = 47477 SQL (1.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:12.229073"], ["id", 1039265257]]  (2.7ms) commit transaction spawn> child[47472] took 0.173483 sec spawn> child PID = 47478  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47474] took 0.15976 sec [ActiveJob]  (0.2ms) begin transaction  (2.3ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 701625837) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources"  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 98413728, 245026679, 784085492)  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 779853880, 245026679, 431685987) spawn> child[47476] took 0.150103 sec Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 948421225) [ActiveJob] SQL (25.0ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 07657bb5-146b-476e-9c81-65ec26e4a4fd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:02:12.266014"], ["created_at", "2016-05-09 13:02:12.266718"], ["updated_at", "2016-05-09 13:02:12.266718"]]  (1.0ms) commit transaction SQLite3::IOException: disk I/O error: commit transaction [ActiveJob]  (1.2ms) commit transaction  (0.1ms) begin transaction  (0.4ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:12.299053"], ["id", 14225656]]  (2.7ms) commit transaction  (2.3ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47469] took 0.276389 sec  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 431685987) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 785871319) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 14225656) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 515736925) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [65998a43-feaf-4928-b9a0-4559ee64daa5] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [65998a43-feaf-4928-b9a0-4559ee64daa5] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 4.46ms  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 spawn> child[47477] took 0.151201 sec Completed 422 Unprocessable Entity in 24ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 57ms (Views: 7.8ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.9ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2afb37aef73b6e19c7e7654ceac28eec"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "2afb37aef73b6e19c7e7654ceac28eec"], ["created_at", "2016-05-09 13:02:12.511411"], ["updated_at", "2016-05-09 13:02:12.511411"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 13:02:12.522875"], ["updated_at", "2016-05-09 13:02:12.522875"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.5ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 10ms (Views: 5.8ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:02:12.573631"], ["updated_at", "2016-05-09 13:02:12.573631"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:02:12.579667"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:02:12.586015"], ["updated_at", "2016-05-09 13:02:12.586015"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:12.588752"], ["updated_at", "2016-05-09 13:02:12.588752"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:12.593426"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:02:12.599249"], ["id", 1039265257]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 1.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:12.607782"], ["id", 1039265257]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:12.616354"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.2ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:12.622690"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:02:12.635521"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b1d07131d078e4967a396564862bfa15"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b1d07131d078e4967a396564862bfa15"], ["created_at", "2016-05-09 13:02:12.663228"], ["updated_at", "2016-05-09 13:02:12.663228"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1501dce93fd758ad90061f2a39e20f5d"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1501dce93fd758ad90061f2a39e20f5d"], ["created_at", "2016-05-09 13:02:12.667645"], ["updated_at", "2016-05-09 13:02:12.667645"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8937cc5c0b2bd9f099b8346ad784c664"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8937cc5c0b2bd9f099b8346ad784c664"], ["created_at", "2016-05-09 13:02:12.676278"], ["updated_at", "2016-05-09 13:02:12.676278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fdce160d0ac7222ab960201ed31c2b4a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fdce160d0ac7222ab960201ed31c2b4a"], ["created_at", "2016-05-09 13:02:12.679633"], ["updated_at", "2016-05-09 13:02:12.679633"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7a4cfb03db388d411da03cb8bd68d3ec"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7a4cfb03db388d411da03cb8bd68d3ec"], ["created_at", "2016-05-09 13:02:12.683730"], ["updated_at", "2016-05-09 13:02:12.683730"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:02:12.691999"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47467  (0.9ms) begin transaction spawn> child PID = 47479 Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:02:12.736845"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.7ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47467  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.5ms)  (0.1ms) rollback transaction spawn> child PID = 47480  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:12', '2016-05-09 13:02:12', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:12', '2016-05-09 13:02:12', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:12', '2016-05-09 13:02:12', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:12.801309"], ["id", 335514824]] SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:02:12.804369"], ["id", 431685987]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (3.2ms) commit transaction Fogged::Resource Load (4.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources --------------------------------------------------- spawn> child[47479] took 0.094535 sec  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:12.814919"], ["updated_at", "2016-05-09 13:02:12.814919"]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"}  (0.2ms) RELEASE SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (1.0ms) begin transaction  (0.1ms) commit transaction  (0.1ms) SAVEPOINT active_record_1  (0.0ms) begin transaction  (1.1ms) commit transaction SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:12.828847"], ["updated_at", "2016-05-09 13:02:12.828847"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 13:02:12.830895"], ["updated_at", "2016-05-09 13:02:12.830895"]] Completed 200 OK in 14ms (Views: 4.5ms | ActiveRecord: 2.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 13:02:12.833694"], ["updated_at", "2016-05-09 13:02:12.833694"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction spawn> child[47480] took 0.071269 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:02:14.587311"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:02:16.597994"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a]  (1.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8c22c69-f06b-410a-a3e3-99b77df8151a] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 4214.59ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47478] took 4.364345 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 38ms (Views: 5.0ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.3ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5b8b8a12cf120bf1bf41050eeb3c3800"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "5b8b8a12cf120bf1bf41050eeb3c3800"], ["created_at", "2016-05-09 13:02:37.241735"], ["updated_at", "2016-05-09 13:02:37.241735"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 13:02:37.250536"], ["updated_at", "2016-05-09 13:02:37.250536"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d9508e06be37749f1d0be0ac33582957"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d9508e06be37749f1d0be0ac33582957"], ["created_at", "2016-05-09 13:02:37.280270"], ["updated_at", "2016-05-09 13:02:37.280270"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4d873a710b3dc0576e6b757b2eda3a84"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4d873a710b3dc0576e6b757b2eda3a84"], ["created_at", "2016-05-09 13:02:37.283602"], ["updated_at", "2016-05-09 13:02:37.283602"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "22b62371ee947c66d6034c73742905c9"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "22b62371ee947c66d6034c73742905c9"], ["created_at", "2016-05-09 13:02:37.288458"], ["updated_at", "2016-05-09 13:02:37.288458"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ad5ce0dda9f06c2b2ecaecc0bc370b5e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ad5ce0dda9f06c2b2ecaecc0bc370b5e"], ["created_at", "2016-05-09 13:02:37.291138"], ["updated_at", "2016-05-09 13:02:37.291138"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "bae0edf8160b08c6c4acbc125738b823"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "bae0edf8160b08c6c4acbc125738b823"], ["created_at", "2016-05-09 13:02:37.294674"], ["updated_at", "2016-05-09 13:02:37.294674"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:02:37.308384"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47489 spawn> child PID = 47490  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 849405871, 624739301, 819504217) Fixture Insert (0.7ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:02:37.372512"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:37.383332"], ["updated_at", "2016-05-09 13:02:37.383332"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:37.392298"], ["updated_at", "2016-05-09 13:02:37.392298"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 13:02:37.393829"], ["updated_at", "2016-05-09 13:02:37.393829"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 13:02:37.395587"], ["updated_at", "2016-05-09 13:02:37.395587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "574d0d5a67ab6a2ed01c954578777d5c"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "574d0d5a67ab6a2ed01c954578777d5c"], ["created_at", "2016-05-09 13:02:37.409778"], ["updated_at", "2016-05-09 13:02:37.409778"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.4ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) begin transaction Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:37.427071"], ["id", 335514824]] Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (4.9ms) commit transaction spawn> child[47490] took 0.102638 sec  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 2ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:02:37.464345"], ["updated_at", "2016-05-09 13:02:37.464345"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:02:37.468974"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:02:37.473811"], ["updated_at", "2016-05-09 13:02:37.473811"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:37.477165"], ["updated_at", "2016-05-09 13:02:37.477165"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 3ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:37.520297"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:02:37.524733"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:37.529535"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:37.537077"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:37.543036"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47489  (0.9ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47489 spawn> child PID = 47491  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 620280917) spawn> child PID = 47492 Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:02:37.598018"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47489  (1.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.4ms)  (0.2ms) rollback transaction spawn> child PID = 47493  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:37', '2016-05-09 13:02:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:37', '2016-05-09 13:02:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:37', '2016-05-09 13:02:37', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:02:37.666388"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [531ee057-2b21-474e-876d-bb5a1e5463f8] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 Fogged::Resource Load (1.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 11ms (Views: 4.6ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [531ee057-2b21-474e-876d-bb5a1e5463f8] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.39ms spawn> child[47491] took 0.111406 sec Processing by Fogged::ResourcesController#confirm as HTML  (2.6ms) rollback transaction Parameters: {"id"=>"335514824"}  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47489 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (0.2ms) begin transaction  (0.7ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:37.693463"], ["id", 335514824]] spawn> parent PID = 47489  (0.8ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47489 Completed 200 OK in 22ms (Views: 3.6ms | ActiveRecord: 1.9ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ spawn> child PID = 47494 spawn> child[47493] took 0.074898 sec Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47489  (0.8ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> child PID = 47495 spawn> parent PID = 47489  (0.8ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- spawn> child PID = 47496 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47489 spawn> child PID = 47497  (1.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47489 spawn> child PID = 47498  (1.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- spawn> child[47498] took 0.008405 sec Fogged::Resource Load (8.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47489 spawn> child PID = 47499 spawn> child PID = 47500 spawn> child[47500] took 0.012249 sec spawn> child PID = 47501  (1.3ms) begin transaction SQL (1.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:37.946817"], ["id", 1039265257]]  (2.0ms) commit transaction spawn> child[47495] took 0.24062 sec  (1.9ms) begin transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:37.972025"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[47496] took 0.253745 sec  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47501] took 0.205308 sec  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47499] took 0.2346 sec  (1.4ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:38.005057"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[47497] took 0.277767 sec [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: b8d53747-eabb-4b35-8a0e-c8d3467696de) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: b8d53747-eabb-4b35-8a0e-c8d3467696de\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:02:38.060877"], ["created_at", "2016-05-09 13:02:38.061258"], ["updated_at", "2016-05-09 13:02:38.061258"]] [ActiveJob]  (0.8ms) commit transaction  (0.0ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:38.066051"], ["id", 14225656]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47494] took 0.362594 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:02:42.091843"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:02:44.554116"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386]  (1.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [45dd4819-b77b-4fd3-a4b5-97cdfa7ef386] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 6869.88ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47492] took 6.988234 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 948421225)  (4.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:02:46.415154"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:46.429352"], ["updated_at", "2016-05-09 13:02:46.429352"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:46.435812"], ["updated_at", "2016-05-09 13:02:46.435812"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 13:02:46.436951"], ["updated_at", "2016-05-09 13:02:46.436951"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 13:02:46.437981"], ["updated_at", "2016-05-09 13:02:46.437981"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47508  (0.8ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47508  (1.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47508 spawn> child PID = 47510  (1.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47508 spawn> child PID = 47511  (1.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47508 spawn> child PID = 47512  (1.3ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47508 spawn> child PID = 47513  (1.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47508 spawn> child PID = 47514  (0.8ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- spawn> child[47514] took 0.006353 sec Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47508 spawn> child PID = 47515 spawn> child PID = 47516 spawn> child[47516] took 0.005729 sec spawn> child PID = 47517  (1.0ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 1039265257) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 14225656) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 515736925) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 624739301) Fixture Insert (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name ---------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:02:46.601181"], ["updated_at", "2016-05-09 13:02:46.601181"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.6ms) begin transaction  (1.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (1.1ms) begin transaction SQL (2.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:46.607698"], ["id", 1039265257]] SQL (0.8ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:02:46.613948"], ["id", 701625837]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ?  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource --------------------------------------------------------  (2.9ms) commit transaction spawn> child[47511] took 0.135577 sec Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] SQL (1.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:46.615707"], ["id", 1039265257]]  (0.4ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:02:46.624345"], ["updated_at", "2016-05-09 13:02:46.624345"]] SQLite3::BusyException: database is locked: INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (8.5ms) commit transaction  (0.2ms) SAVEPOINT active_record_1 spawn> child[47512] took 0.138158 sec  (0.9ms) begin transaction [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 0af27364-3407-46b0-a2f6-458b8de45a43) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 SQL (1.1ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:02:46.634874"], ["updated_at", "2016-05-09 13:02:46.634874"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.7ms) rollback transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) begin transaction spawn> child[47515] took 0.113097 sec ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:46.638573"], ["id", 1039265257]] spawn> parent PID = 47508  (1.4ms) commit transaction spawn> child[47513] took 0.141101 sec  (1.7ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image -----------------------------------------------------------------------  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]]  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47517] took 0.112164 sec spawn> parent PID = 47508 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.9ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 0af27364-3407-46b0-a2f6-458b8de45a43\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:02:46.670282"], ["created_at", "2016-05-09 13:02:46.670877"], ["updated_at", "2016-05-09 13:02:46.670877"]] spawn> child PID = 47518 [ActiveJob]  (1.6ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:46.678892"], ["id", 14225656]]  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47510] took 0.207531 sec  (4.4ms) begin transaction spawn> child PID = 47519 Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 98413728, 245026679, 784085492) Fixture Insert (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:02:46.750601"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 3.6ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 3ms (Views: 2.4ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c35bd311-4017-4ec8-b800-0d17cfe2415e] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c35bd311-4017-4ec8-b800-0d17cfe2415e] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 4.07ms  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction spawn> child[47518] took 0.129461 sec  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e881d3a502271676c19d01b4637f8663"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "e881d3a502271676c19d01b4637f8663"], ["created_at", "2016-05-09 13:02:46.819646"], ["updated_at", "2016-05-09 13:02:46.819646"]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.9ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a6578268db76d9666f784e1b6099e98b"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a6578268db76d9666f784e1b6099e98b"], ["created_at", "2016-05-09 13:02:46.860942"], ["updated_at", "2016-05-09 13:02:46.860942"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e24292548e7f03cd8e8fd255b491ca93"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e24292548e7f03cd8e8fd255b491ca93"], ["created_at", "2016-05-09 13:02:46.865236"], ["updated_at", "2016-05-09 13:02:46.865236"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a85cfe498789ca707585f371f79754bb"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a85cfe498789ca707585f371f79754bb"], ["created_at", "2016-05-09 13:02:46.872758"], ["updated_at", "2016-05-09 13:02:46.872758"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "91eb6521b3cfb710613501d0168748ab"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "91eb6521b3cfb710613501d0168748ab"], ["created_at", "2016-05-09 13:02:46.877284"], ["updated_at", "2016-05-09 13:02:46.877284"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "372ab1fea183d62ac8c5de58d333b534"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "372ab1fea183d62ac8c5de58d333b534"], ["created_at", "2016-05-09 13:02:46.881883"], ["updated_at", "2016-05-09 13:02:46.881883"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:02:46.890723"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47508  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 132093124) spawn> child PID = 47520 Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 937304175) Fixture Insert (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:46', '2016-05-09 13:02:46', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:46', '2016-05-09 13:02:46', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:46', '2016-05-09 13:02:46', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:46.931974"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:02:46.942581"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (ActiveRecord: 1.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:46.952712"], ["id", 1039265257]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:46.963328"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:02:46.972725"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:02:46.986450"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 3.1ms | ActiveRecord: 1.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47508  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:47.015439"], ["id", 335514824]] spawn> child PID = 47521  (0.6ms) commit transaction spawn> child[47520] took 0.104497 sec  (0.1ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 14225656) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:02:47', '2016-05-09 13:02:47', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:02:47', '2016-05-09 13:02:47', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:47', '2016-05-09 13:02:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:47', '2016-05-09 13:02:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:47', '2016-05-09 13:02:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:02:47', '2016-05-09 13:02:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:02:47', '2016-05-09 13:02:47', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction Completed 200 OK in 21ms (Views: 6.0ms | ActiveRecord: 0.4ms) Movie Load (0.4ms) SELECT "movies".* FROM "movies" SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:02:47.062440"], ["id", 335514824]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie ---------------------------------------------------------------------  (7.1ms) commit transaction  (0.2ms) begin transaction Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) commit transaction Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Completed 200 OK in 20ms (Views: 3.5ms | ActiveRecord: 7.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] spawn> child[47521] took 0.06323 sec Completed 200 OK in 11ms (Views: 6.9ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f95e6f29c02a41a16659101799419caa"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "f95e6f29c02a41a16659101799419caa"], ["created_at", "2016-05-09 13:02:47.095061"], ["updated_at", "2016-05-09 13:02:47.095061"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 13:02:47.100544"], ["updated_at", "2016-05-09 13:02:47.100544"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.8ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.7ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062]  (0.4ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:02:52.313461"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:02:54.814830"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062]  (2.4ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a88cb27-41c6-4ebf-8047-5efe585e7062] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 7998.49ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47519] took 8.125257 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:03:01.348550"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:03:01.354436"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.7ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:03:01.359349"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:03:01.365813"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:03:01.371219"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:03:01.404487"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:03:01.439459"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:03:01.451844"], ["updated_at", "2016-05-09 13:03:01.451844"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (5.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:03:01.465624"], ["updated_at", "2016-05-09 13:03:01.465624"]] SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421226], ["created_at", "2016-05-09 13:03:01.467291"], ["updated_at", "2016-05-09 13:03:01.467291"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421226], ["created_at", "2016-05-09 13:03:01.468890"], ["updated_at", "2016-05-09 13:03:01.468890"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "86d686d01e96b4afccbedd389a9cd168"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "86d686d01e96b4afccbedd389a9cd168"], ["created_at", "2016-05-09 13:03:01.475972"], ["updated_at", "2016-05-09 13:03:01.475972"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (2.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "285541e24f349640732de9b1a35105aa"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "285541e24f349640732de9b1a35105aa"], ["created_at", "2016-05-09 13:03:01.482500"], ["updated_at", "2016-05-09 13:03:01.482500"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265258]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f2d5ab04181a2722f4d71a963cf3d144"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f2d5ab04181a2722f4d71a963cf3d144"], ["created_at", "2016-05-09 13:03:01.490132"], ["updated_at", "2016-05-09 13:03:01.490132"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "33293cd7326d6ad2a4fd0d065a3f256f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "33293cd7326d6ad2a4fd0d065a3f256f"], ["created_at", "2016-05-09 13:03:01.493310"], ["updated_at", "2016-05-09 13:03:01.493310"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.3ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "33091cc591fd10eab9d6a8adb1a0a0c0"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "33091cc591fd10eab9d6a8adb1a0a0c0"], ["created_at", "2016-05-09 13:03:01.498754"], ["updated_at", "2016-05-09 13:03:01.498754"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:03:01.510831"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47530 spawn> child PID = 47531  (0.8ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 132093124) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 335514824) Fixture Insert (1.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 849405871, 624739301, 819504217) Fixture Insert (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 948421225)  (0.9ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:03:01.576147"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 2.5ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47530  (2.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 2ms (ActiveRecord: 0.4ms)  (0.1ms) rollback transaction spawn> child PID = 47532  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 14225656) Fixture Insert (1.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47530  (0.1ms) begin transaction  (1.3ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:03:01.638008"], ["id", 335514824]] ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ----------------------------------------------------------------  (0.8ms) commit transaction spawn> child[47531] took 0.105712 sec Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47530  (0.8ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47530 spawn> child PID = 47533 Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"}  (2.2ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> child PID = 47534 spawn> parent PID = 47530  (0.2ms) begin transaction  (0.1ms) commit transaction  (0.1ms) begin transaction  (1.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) commit transaction Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47530 Completed 200 OK in 18ms (Views: 6.8ms | ActiveRecord: 0.6ms) spawn> child PID = 47535 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47532] took 0.079866 sec  (1.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47530 spawn> child PID = 47536  (0.8ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child PID = 47537 spawn> parent PID = 47530 spawn> child[47537] took 0.00638 sec  (2.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47530 spawn> child PID = 47538 spawn> child PID = 47539 spawn> child[47539] took 0.006003 sec  (1.5ms) begin transaction spawn> child PID = 47540 Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 431685987) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 596998220) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:03:01', '2016-05-09 13:03:01', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:03:01', '2016-05-09 13:03:01', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 245026679) Fixture Insert (1.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:03:01', '2016-05-09 13:03:01', 948421225)  (1.0ms) commit transaction  (0.2ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name ---------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (1.2ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:03:01.787543"], ["id", 1039265257]] SQL (0.7ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:03:01.791033"], ["updated_at", "2016-05-09 13:03:01.791033"]] SQLite3::BusyException: database is locked: INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (2.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- spawn> child[47534] took 0.130232 sec Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:03:01.799117"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 50c8d983-6ef9-4ea6-8028-dd97d8ba77ee) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:03:01.808380"], ["updated_at", "2016-05-09 13:03:01.808380"]]  (0.6ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (1.7ms) begin transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.6ms) begin transaction SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:03:01.812873"], ["updated_at", "2016-05-09 13:03:01.812873"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:03:01.813470"], ["id", 1039265257]]  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47538] took 0.096599 sec SQL (1.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:03:01.816455"], ["id", 1039265257]]  (1.7ms) commit transaction SQLite3::IOException: disk I/O error: commit transaction  (0.3ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction spawn> Exception in child[47535] - ActiveRecord::StatementInvalid: SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:526:in `rollback' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:361:in `block in exec_rollback_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:361:in `exec_rollback_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:262:in `rollback_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/query_cache.rb:14:in `rollback_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:149:in `rollback' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:200:in `rescue in within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:197:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:44:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:39:in `new' /Users/david/projects/fogged/test/test_helper.rb:39:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47535] took 0.141948 sec  (1.5ms) commit transaction  (1.6ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child[47536] took 0.129174 sec Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}} [ActiveJob]  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6c23d490c15f8987ab2bf3ee90718cb9"]] [ActiveJob] SQL (0.5ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 50c8d983-6ef9-4ea6-8028-dd97d8ba77ee\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:03:01.831595"], ["created_at", "2016-05-09 13:03:01.832079"], ["updated_at", "2016-05-09 13:03:01.832079"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "6c23d490c15f8987ab2bf3ee90718cb9"], ["created_at", "2016-05-09 13:03:01.833472"], ["updated_at", "2016-05-09 13:03:01.833472"]] SQLite3::BusyException: database is locked: INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 5ms (ActiveRecord: 0.8ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction [ActiveJob]  (1.7ms) commit transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:03:01.838479"], ["id", 14225656]] Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (4.2ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child[47533] took 0.188597 sec Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47540] took 0.098566 sec  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (1.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 16ms (Views: 4.3ms | ActiveRecord: 0.5ms) Movie Load (0.3ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.6ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "889052df7056f9f37c84bda0428ba990"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "889052df7056f9f37c84bda0428ba990"], ["created_at", "2016-05-09 13:03:01.922537"], ["updated_at", "2016-05-09 13:03:01.922537"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.7ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265258], ["created_at", "2016-05-09 13:03:01.926272"], ["updated_at", "2016-05-09 13:03:01.926272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.5ms)  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.1ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47530  (0.9ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47530 spawn> child PID = 47541 spawn> child PID = 47542 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [3c82f5c9-4987-488f-9234-6eb15f1c3963] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [3c82f5c9-4987-488f-9234-6eb15f1c3963] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.65ms spawn> child[47541] took 0.135238 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050]  (0.4ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050] SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:03:04.521377"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050]  (0.3ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:03:07.966242"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050]  (1.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [27411706-8adf-4991-ac06-4cdeef342050] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 5840.7ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47542] took 5.98656 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:29', '2016-05-09 13:04:29', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:29', '2016-05-09 13:04:29', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:29', '2016-05-09 13:04:29', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:29', '2016-05-09 13:04:29', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:29', '2016-05-09 13:04:29', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:29', '2016-05-09 13:04:29', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:29', '2016-05-09 13:04:29', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image -----------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name ---------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource --------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource --------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ----------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ----------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs -----------------------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick ---------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder -------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id --------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ----------------------------------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job --------------------------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id --------------------------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload -------------------------------------------------------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder -------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource --------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource --------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource --------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource --------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie ---------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name -----------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies --------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id -------------------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------  (0.1ms) BEGIN TRANSACTION; END; SQLite3::SQLException: cannot start a transaction within a transaction: BEGIN TRANSACTION; END;  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:53', '2016-05-09 13:04:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:53', '2016-05-09 13:04:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) ROLLBACK;  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d9c738df7fea02c655e3a1d9bd81f432"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d9c738df7fea02c655e3a1d9bd81f432"], ["created_at", "2016-05-09 13:04:53.746421"], ["updated_at", "2016-05-09 13:04:53.746421"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "eb990a4b440b4c1700abda17d1b4cdef"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "eb990a4b440b4c1700abda17d1b4cdef"], ["created_at", "2016-05-09 13:04:53.750340"], ["updated_at", "2016-05-09 13:04:53.750340"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265259]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "efb94ba9a6a60fce0dda1d78dde2e8f3"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "efb94ba9a6a60fce0dda1d78dde2e8f3"], ["created_at", "2016-05-09 13:04:53.755993"], ["updated_at", "2016-05-09 13:04:53.755993"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8bfacf38ed59e8064c9041fafab2aba1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8bfacf38ed59e8064c9041fafab2aba1"], ["created_at", "2016-05-09 13:04:53.759244"], ["updated_at", "2016-05-09 13:04:53.759244"]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e658ac521b38849cf99629bf2261e408"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e658ac521b38849cf99629bf2261e408"], ["created_at", "2016-05-09 13:04:53.763574"], ["updated_at", "2016-05-09 13:04:53.763574"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image --------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:04:53.778514"], ["id", 785871319]]  (0.9ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video --------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------  (0.0ms) ROLLBACK; spawn> parent PID = 47590 spawn> child PID = 47593  (0.7ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:53', '2016-05-09 13:04:53', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:53', '2016-05-09 13:04:53', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 98413728, 245026679, 784085492) Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:53', '2016-05-09 13:04:53', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:53', '2016-05-09 13:04:53', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) ROLLBACK;  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "31d5f9f991f69e5fa428f0514ebafef5"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "31d5f9f991f69e5fa428f0514ebafef5"], ["created_at", "2016-05-09 13:04:53.841158"], ["updated_at", "2016-05-09 13:04:53.841158"]]  (0.8ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 3.8ms | ActiveRecord: 2.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.0ms) ROLLBACK;  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) ROLLBACK;  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.6ms) ROLLBACK;  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) ROLLBACK;  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.3ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 5ms (ActiveRecord: 0.4ms)  (0.3ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (1.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name ---------------------------------------------------  (0.1ms) ROLLBACK;  (0.4ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:04:53.912166"], ["id", 335514824]]  (0.6ms) commit transaction Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> child[47593] took 0.112947 sec  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:04:53.930590"], ["updated_at", "2016-05-09 13:04:53.930590"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource -------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:04:53.936791"], ["id", 701625837]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource --------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:04:53.943466"], ["updated_at", "2016-05-09 13:04:53.943466"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ----------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource --------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource --------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource --------------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ----------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47590  (1.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ----------------------------------------------------------------  (0.2ms) ROLLBACK; Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47590  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs -----------------------------------------------------------------------------------  (0.1ms) ROLLBACK; spawn> child PID = 47594 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47590  (1.2ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (1.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47590 spawn> child PID = 47596  (2.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47590 spawn> child PID = 47597  (0.8ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick ---------------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> child PID = 47598 spawn> parent PID = 47590  (2.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ----------------------------------------------------------------------------------------  (0.3ms) ROLLBACK; Fogged::Resource Load (1.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47590 spawn> child PID = 47599  (1.9ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder -------------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47590 spawn> child PID = 47600 spawn> child[47599] took 0.032806 sec spawn> child PID = 47601 spawn> child[47601] took 0.011802 sec spawn> child PID = 47602  (2.9ms) begin transaction  (0.7ms) SELECT COUNT(*) FROM "delayed_jobs" Fixture Delete (1.0ms) DELETE FROM "fogged_resources" Fixture Insert (1.0ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 701625837) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 819504217) Fixture Insert (1.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 132093124) Fixture Insert (0.9ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 431685987) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 620280917) Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 1039265257) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 596998220) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 433078596) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 937304175) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 515736925)  (1.2ms) begin transaction Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 579229346) Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 153115190) Fixture Delete (0.6ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 419883833, 624739301, 701625837) Fixture Insert (0.5ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: b7e03558-810b-4083-9eb1-6fd7dfa475f2) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 948421225)  (1.3ms) commit transaction SQL (12.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:04:54.193715"], ["id", 1039265257]] SQLite3::IOException: disk I/O error: commit transaction  (1.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (1.4ms) commit transaction spawn> child[47596] took 0.211788 sec  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 431685987) [ActiveJob]  (0.1ms) begin transaction Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 596998220) Fixture Insert (1.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 948421225)  (1.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------  (1.1ms) begin transaction [ActiveJob] SQL (13.9ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: b7e03558-810b-4083-9eb1-6fd7dfa475f2\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:04:54.233320"], ["created_at", "2016-05-09 13:04:54.233932"], ["updated_at", "2016-05-09 13:04:54.233932"]]  (0.1ms) ROLLBACK; spawn> parent PID = 47590 [ActiveJob]  (2.9ms) commit transaction  (0.1ms) begin transaction SQL (1.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:04:54.251139"], ["id", 1039265257]]  (1.2ms) commit transaction spawn> child[47597] took 0.24686 sec SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:04:54.257129"], ["id", 14225656]]  (2.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.1ms) ROLLBACK;  (5.2ms) commit transaction  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47594] took 0.281987 sec Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 7ms (ActiveRecord: 0.5ms)  (0.6ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.5ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47602] took 0.165134 sec spawn> child PID = 47603 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:04:54.287207"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[47598] took 0.26756 sec  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47600] took 0.226553 sec  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 335514824) Fixture Insert (1.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.4ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 948421225)  (4.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ----------------------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:04:54.338762"], ["id", 1039265257]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"}  (0.6ms) RELEASE SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) begin transaction  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:04:54.347589"], ["id", 1039265257]]  (0.8ms) RELEASE SAVEPOINT active_record_1 SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:04:54.347212"], ["id", 335514824]] Completed 200 OK in 6ms (ActiveRecord: 1.5ms)  (0.7ms) commit transaction Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) begin transaction  (0.3ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job --------------------------------------------------------------------------------------------------------------  (0.1ms) commit transaction  (0.1ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Completed 200 OK in 15ms (Views: 3.3ms | ActiveRecord: 2.1ms)  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- spawn> child[47603] took 0.074682 sec  (0.1ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (1.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) ROLLBACK;  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) ROLLBACK;  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) ROLLBACK;  (0.3ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) ROLLBACK;  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder -------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id --------------------------------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:04:54.386600"], ["id", 785871319]]  (0.5ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.0ms | ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47590  (1.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image -----------------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47590 spawn> child PID = 47604 spawn> child PID = 47605  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 701625837) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:04:54', '2016-05-09 13:04:54', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 98413728, 245026679, 784085492) Fixture Insert (2.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:04:54', '2016-05-09 13:04:54', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 624739301) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:04:54', '2016-05-09 13:04:54', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource -------------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:04:54.490243"], ["id", 431685987]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) ROLLBACK;  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:04:54.499069"], ["updated_at", "2016-05-09 13:04:54.499069"]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [31c29a26-5540-4ab6-93b4-ce0ebd4f18ab] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources --------------------------------------------------------  (0.1ms) ROLLBACK; Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [31c29a26-5540-4ab6-93b4-ce0ebd4f18ab] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.72ms spawn> child[47604] took 0.095376 sec  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:04:54.508976"], ["updated_at", "2016-05-09 13:04:54.508976"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421227], ["created_at", "2016-05-09 13:04:54.511372"], ["updated_at", "2016-05-09 13:04:54.511372"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421227], ["created_at", "2016-05-09 13:04:54.513373"], ["updated_at", "2016-05-09 13:04:54.513373"]]  (0.8ms) RELEASE SAVEPOINT active_record_1  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource --------------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.7ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 1.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ----------------------------------------------------------------------------------------  (0.0ms) ROLLBACK; Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------  (0.1ms) ROLLBACK; Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421226]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421227]] Completed 200 OK in 26ms (Views: 5.8ms | ActiveRecord: 0.8ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421226]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421227]]  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie ---------------------------------------------------------------------  (0.0ms) ROLLBACK; Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 3.0ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name -----------------------------------------------------------------------------------------------  (0.0ms) ROLLBACK; Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7c6a2374e6826d7b5fe26deda1791b75"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "7c6a2374e6826d7b5fe26deda1791b75"], ["created_at", "2016-05-09 13:04:54.582128"], ["updated_at", "2016-05-09 13:04:54.582128"]]  (0.7ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265264], ["created_at", "2016-05-09 13:04:54.586130"], ["updated_at", "2016-05-09 13:04:54.586130"]]  (2.9ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies --------------------------------------------------------------------  (0.0ms) ROLLBACK; Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.4ms | ActiveRecord: 0.4ms)  (0.2ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id -------------------------------------------------------------------------------  (0.1ms) ROLLBACK; Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction SQLite3::SQLException: cannot rollback - no transaction is active: rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:04:59.083980"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:05:02.479370"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261]  (1.4ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e43711a9-ee31-44b5-b51c-29df7e7be261] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 7960.74ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47605] took 8.069375 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:32', '2016-05-09 13:05:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:32', '2016-05-09 13:05:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:05:32.718499"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 4.3ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "de36893d884b1a3ab8d22e8adb244468"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "de36893d884b1a3ab8d22e8adb244468"], ["created_at", "2016-05-09 13:05:32.798967"], ["updated_at", "2016-05-09 13:05:32.798967"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:05:32.808538"], ["updated_at", "2016-05-09 13:05:32.808538"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.3ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:05:32.847224"], ["updated_at", "2016-05-09 13:05:32.847224"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:05:32.851294"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:05:32.860919"], ["updated_at", "2016-05-09 13:05:32.860919"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:05:32.863569"], ["updated_at", "2016-05-09 13:05:32.863569"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47618  (0.9ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47618 spawn> child PID = 47619 spawn> child PID = 47620  (1.2ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 620280917) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:32', '2016-05-09 13:05:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:32', '2016-05-09 13:05:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:32', '2016-05-09 13:05:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:32', '2016-05-09 13:05:32', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:32.930581"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:05:32.938059"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:32.946300"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:32.956637"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.6ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:32.965018"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47618  (1.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47618 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c82d2960-d8d6-430e-a633-532b5debc761] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (1.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c82d2960-d8d6-430e-a633-532b5debc761] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 5.11ms spawn> child[47619] took 0.117508 sec Fogged::Resource Load (1.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47618 spawn> child PID = 47621 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050  (1.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47618 spawn> child PID = 47622  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47618 spawn> child PID = 47623  (1.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47618  (2.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47618 spawn> child PID = 47624  (1.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- spawn> child PID = 47625 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47618 spawn> child[47625] took 0.008413 sec spawn> child PID = 47626  (1.7ms) begin transaction spawn> child PID = 47627 Fixture Delete (1.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.7ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 517391740) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 620280917) spawn> child[47627] took 0.008452 sec Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:33', '2016-05-09 13:05:33', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:33', '2016-05-09 13:05:33', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 153115190) spawn> child PID = 47628 Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 779853880, 245026679, 431685987) Fixture Delete (0.6ms) DELETE FROM "movies" Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 624739301) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 948421225)  (1.1ms) commit transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:05:33.141457"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Completed 200 OK in 17ms (Views: 3.9ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (1.1ms) begin transaction  (1.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47618 SQL (0.8ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:33.162256"], ["id", 1039265257]]  (0.9ms) commit transaction spawn> child[47622] took 0.145734 sec  (1.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"}  (0.9ms) begin transaction Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 3ms (ActiveRecord: 1.1ms)  (0.1ms) rollback transaction SQL (1.0ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:33.180259"], ["id", 1039265257]]  (5.0ms) commit transaction spawn> child[47623] took 0.156132 sec [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: ebc056fe-9b8d-4133-a5e3-f7ae559c2caf) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 spawn> child PID = 47629  (0.7ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:33.200516"], ["id", 1039265257]]  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" SQLite3::BusyException: database is locked: DELETE FROM "fogged_resources"  (0.1ms) rollback transaction  (5.8ms) commit transaction spawn> child[47624] took 0.156644 sec [ActiveJob]  (0.1ms) begin transaction  (0.1ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: ebc056fe-9b8d-4133-a5e3-f7ae559c2caf\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:05:33.220996"], ["created_at", "2016-05-09 13:05:33.221483"], ["updated_at", "2016-05-09 13:05:33.221483"]] Fixture Delete (0.6ms) DELETE FROM "fogged_resources" SQLite3::BusyException: database is locked: DELETE FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47626] took 0.143499 sec [ActiveJob]  (0.8ms) commit transaction  (0.1ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:33.227632"], ["id", 14225656]]  (3.6ms) commit transaction  (0.2ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47621] took 0.223527 sec Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 132093124) Fixture Insert (1.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 183950720) Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 1039265257) Fixture Insert (0.8ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 515736925) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:33', '2016-05-09 13:05:33', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:33', '2016-05-09 13:05:33', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 948421225)  (0.9ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) begin transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SAVEPOINT active_record_1 spawn> child[47628] took 0.140197 sec Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d96b17abf229fef9b5a960b0c456dc01"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d96b17abf229fef9b5a960b0c456dc01"], ["created_at", "2016-05-09 13:05:33.257886"], ["updated_at", "2016-05-09 13:05:33.257886"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.2ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.8ms) rollback transaction SQL (8.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:33.257236"], ["id", 335514824]]  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.6ms) commit transaction Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fd8c7628f7bd6d9b5cf11b9cb1741843"]]  (0.1ms) begin transaction SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fd8c7628f7bd6d9b5cf11b9cb1741843"], ["created_at", "2016-05-09 13:05:33.270201"], ["updated_at", "2016-05-09 13:05:33.270201"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (1.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6c0d77e2b9b557fdb9c5f0e9ff036e65"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6c0d77e2b9b557fdb9c5f0e9ff036e65"], ["created_at", "2016-05-09 13:05:33.273557"], ["updated_at", "2016-05-09 13:05:33.273557"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 25ms (Views: 3.8ms | ActiveRecord: 10.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6a47c75c44b035a4331f10c57432963a"]] spawn> child[47629] took 0.08688 sec SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "6a47c75c44b035a4331f10c57432963a"], ["created_at", "2016-05-09 13:05:33.281649"], ["updated_at", "2016-05-09 13:05:33.281649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:05:33.294078"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47618 spawn> child PID = 47630  (0.6ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:33', '2016-05-09 13:05:33', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:33', '2016-05-09 13:05:33', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.3ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:33', '2016-05-09 13:05:33', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:33', '2016-05-09 13:05:33', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:05:33.343489"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:05:33.353643"], ["updated_at", "2016-05-09 13:05:33.353643"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:05:33.361400"], ["updated_at", "2016-05-09 13:05:33.361400"]] SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:05:33.362989"], ["updated_at", "2016-05-09 13:05:33.362989"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:05:33.364396"], ["updated_at", "2016-05-09 13:05:33.364396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (1.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d859ea86fff0811941ee2e13db2edb92"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "d859ea86fff0811941ee2e13db2edb92"], ["created_at", "2016-05-09 13:05:33.376401"], ["updated_at", "2016-05-09 13:05:33.376401"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 10ms (Views: 3.8ms | ActiveRecord: 2.2ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (1.8ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) begin transaction  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}} SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:33.400991"], ["id", 335514824]]  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (2.6ms) commit transaction spawn> child[47630] took 0.090946 sec  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b]  (0.4ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:05:34.889243"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:05:36.673829"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b]  (2.5ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [f22a9d7c-eccf-45b9-8217-84878c98ba6b] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3662.07ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47620] took 3.79101 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 183950720) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:42', '2016-05-09 13:05:42', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:42', '2016-05-09 13:05:42', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 4ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 27ms (Views: 3.5ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9b7db3e92fbf0052ec8775d35fb6f304"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "9b7db3e92fbf0052ec8775d35fb6f304"], ["created_at", "2016-05-09 13:05:42.781730"], ["updated_at", "2016-05-09 13:05:42.781730"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:05:42.790237"], ["updated_at", "2016-05-09 13:05:42.790237"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "8b92d3e777b27cc398b3dde58569745a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "8b92d3e777b27cc398b3dde58569745a"], ["created_at", "2016-05-09 13:05:42.818966"], ["updated_at", "2016-05-09 13:05:42.818966"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "35935f976197319f04960344e98858bd"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "35935f976197319f04960344e98858bd"], ["created_at", "2016-05-09 13:05:42.823068"], ["updated_at", "2016-05-09 13:05:42.823068"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0361a4c9671c3450241f1bedae565d84"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0361a4c9671c3450241f1bedae565d84"], ["created_at", "2016-05-09 13:05:42.829704"], ["updated_at", "2016-05-09 13:05:42.829704"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "be8b79331fcd7266bd0a78451405f5e4"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "be8b79331fcd7266bd0a78451405f5e4"], ["created_at", "2016-05-09 13:05:42.833189"], ["updated_at", "2016-05-09 13:05:42.833189"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "22c41b9ec38e98f3c11f713835a4314b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "22c41b9ec38e98f3c11f713835a4314b"], ["created_at", "2016-05-09 13:05:42.837964"], ["updated_at", "2016-05-09 13:05:42.837964"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:05:42.853021"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47638 spawn> child PID = 47640  (0.8ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:42', '2016-05-09 13:05:42', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:42', '2016-05-09 13:05:42', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:42', '2016-05-09 13:05:42', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:42', '2016-05-09 13:05:42', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:05:42.914876"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 3.1ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:42.928435"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:05:42.935998"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:42.943222"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:42.954587"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:05:42.963542"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (1.0ms) rollback transaction Fogged::Resource Load (1.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47638  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:42.980153"], ["id", 335514824]]  (0.9ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ----------------------------------------------------------------  (2.1ms) commit transaction spawn> child[47640] took 0.110971 sec Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47638  (1.7ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- spawn> child PID = 47641 Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47638  (1.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ spawn> child PID = 47642 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47638  (2.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47638 spawn> child PID = 47643  (1.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47638 spawn> child PID = 47644  (0.7ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (1.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47638 spawn> child PID = 47645  (1.9ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47638 spawn> child[47645] took 0.014038 sec spawn> child PID = 47646 spawn> child PID = 47647 spawn> child[47647] took 0.01025 sec spawn> child PID = 47648  (1.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 517391740) Fixture Insert (1.9ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 701625837) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 819504217) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 132093124) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 431685987) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 183950720) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 515736925) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:43', '2016-05-09 13:05:43', 538821867) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:43', '2016-05-09 13:05:43', 731805050) Fixture Delete (0.5ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 98413728, 245026679, 784085492) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 779853880, 245026679, 431685987) Fixture Delete (0.2ms) DELETE FROM "movies" Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 948421225)  (1.0ms) commit transaction  (0.3ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name ---------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (1.0ms) begin transaction Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:43.172166"], ["id", 1039265257]] SQL (1.1ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:05:43.177777"], ["updated_at", "2016-05-09 13:05:43.177777"]] SQLite3::BusyException: database is locked: INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)  (0.2ms) ROLLBACK TO SAVEPOINT active_record_1  (0.2ms) rollback transaction  (0.2ms) begin transaction  (9.1ms) commit transaction spawn> child[47642] took 0.17385 sec ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1  (0.6ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:05:43.190673"], ["id", 701625837]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.3ms) SAVEPOINT active_record_1 [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: db9f2196-d3bb-4b00-b8c3-771e1243e863) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:43.194945"], ["id", 1039265257]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:05:43.204711"], ["updated_at", "2016-05-09 13:05:43.204711"]] SQLite3::BusyException: database is locked: INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (5.6ms) commit transaction spawn> child[47643] took 0.176924 sec  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:05:43.209919"], ["updated_at", "2016-05-09 13:05:43.209919"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.6ms) begin transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.6ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47646] took 0.141317 sec SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:43.216044"], ["id", 1039265257]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:05:43.225067"], ["id", 785871319]] SQLite3::BusyException: database is locked: UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [ActiveJob]  (0.1ms) begin transaction  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 500 Internal Server Error in 4ms (ActiveRecord: 0.7ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction  (5.6ms) commit transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> child[47644] took 0.182259 sec spawn> parent PID = 47638 [ActiveJob] SQL (0.7ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: db9f2196-d3bb-4b00-b8c3-771e1243e863\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:05:43.227193"], ["created_at", "2016-05-09 13:05:43.227661"], ["updated_at", "2016-05-09 13:05:43.227661"]] [ActiveJob]  (2.5ms) commit transaction  (0.7ms) begin transaction  (2.3ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:43.239459"], ["id", 14225656]]  (0.7ms) commit transaction  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"}  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47641] took 0.241864 sec Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]]  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47648] took 0.130164 sec Completed 404 Not Found in 2ms (ActiveRecord: 0.3ms)  (0.9ms) rollback transaction spawn> child PID = 47649  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:43', '2016-05-09 13:05:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:43', '2016-05-09 13:05:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "da884a1b1241a2b8b3ec65f478e8d6af"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "da884a1b1241a2b8b3ec65f478e8d6af"], ["created_at", "2016-05-09 13:05:43.290791"], ["updated_at", "2016-05-09 13:05:43.290791"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 8ms (Views: 3.3ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.7ms) begin transaction Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:05:43.305570"], ["id", 335514824]]  (0.7ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------  (1.4ms) commit transaction Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) begin transaction  (0.0ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1 Completed 200 OK in 14ms (Views: 3.1ms | ActiveRecord: 2.7ms)  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" spawn> child[47649] took 0.054434 sec Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (2.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47638  (0.9ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47638 spawn> child PID = 47650  (0.8ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" spawn> child PID = 47651 Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 515736925) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:05:43', '2016-05-09 13:05:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:05:43', '2016-05-09 13:05:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:05:43', '2016-05-09 13:05:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 245026679) Fixture Insert (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:05:43', '2016-05-09 13:05:43', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:05:43.409004"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:05:43.417041"], ["updated_at", "2016-05-09 13:05:43.417041"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:05:43.424662"], ["updated_at", "2016-05-09 13:05:43.424662"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:05:43.426298"], ["updated_at", "2016-05-09 13:05:43.426298"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:05:43.427955"], ["updated_at", "2016-05-09 13:05:43.427955"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [12c05e6b-9a26-4267-9ebf-68e382b668f1] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [12c05e6b-9a26-4267-9ebf-68e382b668f1] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.07ms spawn> child[47650] took 0.091665 sec [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09]  (0.5ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:05:45.089445"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:05:45.444224"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09]  (1.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [18ea29f4-c815-408a-94c2-9c90ca7ebd09] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1978.15ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47651] took 2.071535 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:06:36', '2016-05-09 13:06:36', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:06:36', '2016-05-09 13:06:36', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a4b965d16802b90d6254fe95d5a6404f"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "a4b965d16802b90d6254fe95d5a6404f"], ["created_at", "2016-05-09 13:06:36.089456"], ["updated_at", "2016-05-09 13:06:36.089456"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 24ms (Views: 2.3ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 9ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5197711f2ecba907f840608a674a330a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5197711f2ecba907f840608a674a330a"], ["created_at", "2016-05-09 13:06:36.131760"], ["updated_at", "2016-05-09 13:06:36.131760"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fc2bca95a3370c1474aceebdb6bffb66"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "fc2bca95a3370c1474aceebdb6bffb66"], ["created_at", "2016-05-09 13:06:36.134680"], ["updated_at", "2016-05-09 13:06:36.134680"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1714ba62cec9d9ce279742ea3f328c7b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1714ba62cec9d9ce279742ea3f328c7b"], ["created_at", "2016-05-09 13:06:36.139288"], ["updated_at", "2016-05-09 13:06:36.139288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "56301f70d249f431242a9acf66d2aaec"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "56301f70d249f431242a9acf66d2aaec"], ["created_at", "2016-05-09 13:06:36.141897"], ["updated_at", "2016-05-09 13:06:36.141897"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "67a7646a297d6938035c6d1966e3f41a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "67a7646a297d6938035c6d1966e3f41a"], ["created_at", "2016-05-09 13:06:36.145513"], ["updated_at", "2016-05-09 13:06:36.145513"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:06:36.153565"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47673 spawn> child PID = 47674 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:06:36.244290"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[47674] took 0.072355 sec  (0.7ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:06:36', '2016-05-09 13:06:36', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:06:36', '2016-05-09 13:06:36', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:36', '2016-05-09 13:06:36', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:06:36', '2016-05-09 13:06:36', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:06:36.280357"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:06:36.285542"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:06:36.290538"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:06:36.297638"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:06:36.304354"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:06:36.322332"], ["updated_at", "2016-05-09 13:06:36.322332"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:06:36.328236"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:06:36.333240"], ["updated_at", "2016-05-09 13:06:36.333240"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:06:36.336072"], ["updated_at", "2016-05-09 13:06:36.336072"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:06:36.347829"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47673 spawn> child PID = 47675  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: a5af61f8-17cb-4173-b232-db1d91eb0ef3) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: a5af61f8-17cb-4173-b232-db1d91eb0ef3\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:06:36.494758"], ["created_at", "2016-05-09 13:06:36.495189"], ["updated_at", "2016-05-09 13:06:36.495189"]] [ActiveJob]  (1.0ms) commit transaction  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:06:36.500176"], ["id", 14225656]]  (0.9ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47675] took 0.134408 sec  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47673 spawn> child PID = 47676  (0.4ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:06:36.618525"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[47676] took 0.088942 sec  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47673 spawn> child PID = 47677  (0.8ms) begin transaction  (0.1ms) commit transaction spawn> child[47677] took 0.091263 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47673 spawn> child PID = 47678  (0.6ms) begin transaction  (0.1ms) commit transaction spawn> child[47678] took 0.089206 sec  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47673 spawn> child PID = 47679 spawn> child[47679] took 0.003846 sec  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47673 spawn> child PID = 47680  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47680] took 0.071442 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47673 spawn> child PID = 47681 spawn> child[47681] took 0.005537 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47673 spawn> child PID = 47682  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47682] took 0.067699 sec  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 517391740) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 1039265257) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:06:37', '2016-05-09 13:06:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:06:37', '2016-05-09 13:06:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 579229346) Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.4ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:06:37.158311"], ["id", 785871319]]  (0.4ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47673 spawn> child PID = 47683 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:06:37.228681"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 13ms (Views: 3.5ms | ActiveRecord: 1.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47683] took 0.055601 sec  (1.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:06:37', '2016-05-09 13:06:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:06:37', '2016-05-09 13:06:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:06:37', '2016-05-09 13:06:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:06:37', '2016-05-09 13:06:37', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:06:37.299039"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:06:37.305989"], ["updated_at", "2016-05-09 13:06:37.305989"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:06:37.314245"], ["updated_at", "2016-05-09 13:06:37.314245"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:06:37.315465"], ["updated_at", "2016-05-09 13:06:37.315465"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:06:37.316645"], ["updated_at", "2016-05-09 13:06:37.316645"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47673 spawn> child PID = 47684 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a479ce52-8d2b-4346-bbd4-d493d8936262] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a479ce52-8d2b-4346-bbd4-d493d8936262] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.65ms spawn> child[47684] took 0.084411 sec  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47673 spawn> child PID = 47685 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d30ca74f-1e96-4bde-9a92-2a0e03ef220d] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d30ca74f-1e96-4bde-9a92-2a0e03ef220d]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d30ca74f-1e96-4bde-9a92-2a0e03ef220d] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:06:51.050742"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d30ca74f-1e96-4bde-9a92-2a0e03ef220d]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [d30ca74f-1e96-4bde-9a92-2a0e03ef220d] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 34621.9ms spawn> Exception in child[47685] - OpenURI::HTTPError: 502 Bad Gateway spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:44:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:39:in `new' /Users/david/projects/fogged/test/test_helper.rb:39:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47685] took 34.713843 sec  (0.9ms) begin transaction Fixture Delete (0.5ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 517391740) Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 701625837) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 819504217) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 132093124) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 620280917) Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 335514824) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 596998220) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 433078596) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 785871319) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 515736925) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:07:12', '2016-05-09 13:07:12', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:07:12', '2016-05-09 13:07:12', 731805050) Fixture Delete (0.2ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:07:12', '2016-05-09 13:07:12', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:07:12', '2016-05-09 13:07:12', 849405871, 624739301, 819504217) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:07:12', '2016-05-09 13:07:12', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:07:12', '2016-05-09 13:07:12', 779853880, 245026679, 431685987) Fixture Delete (0.6ms) DELETE FROM "movies" Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:07:12', '2016-05-09 13:07:12', 948421225)  (1.8ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 44ms (Views: 13.6ms | ActiveRecord: 1.4ms) Movie Load (0.4ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.3ms) rollback transaction  (0.3ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.7ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 15ms (Views: 7.5ms | ActiveRecord: 0.6ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f39ec14b45ea54ecc6d02616410fb55d"]] SQL (1.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "f39ec14b45ea54ecc6d02616410fb55d"], ["created_at", "2016-05-09 13:07:12.365624"], ["updated_at", "2016-05-09 13:07:12.365624"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.9ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:07:12.373289"], ["updated_at", "2016-05-09 13:07:12.373289"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 13ms (Views: 6.8ms | ActiveRecord: 0.8ms)  (2.5ms) rollback transaction  (0.4ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (1.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.6ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 21ms (Views: 10.2ms | ActiveRecord: 1.4ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.3ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.4ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms (ActiveRecord: 0.8ms)  (0.2ms) rollback transaction  (0.2ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 4ms (Views: 2.9ms | ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.6ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 5ms (Views: 3.3ms | ActiveRecord: 0.2ms)  (0.4ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 6ms (Views: 3.9ms | ActiveRecord: 0.2ms)  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:09:27', '2016-05-09 13:09:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:09:27', '2016-05-09 13:09:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:09:27', '2016-05-09 13:09:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:09:27', '2016-05-09 13:09:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:09:27', '2016-05-09 13:09:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:09:27', '2016-05-09 13:09:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:09:27', '2016-05-09 13:09:27', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 38ms (Views: 3.4ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.1ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "32b9a1d3f323ddc71546d526dc116717"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "32b9a1d3f323ddc71546d526dc116717"], ["created_at", "2016-05-09 13:09:27.611553"], ["updated_at", "2016-05-09 13:09:27.611553"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:09:27.623205"], ["updated_at", "2016-05-09 13:09:27.623205"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:09:27.655158"], ["updated_at", "2016-05-09 13:09:27.655158"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:09:27.660279"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:09:27.673587"], ["updated_at", "2016-05-09 13:09:27.673587"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:09:27.676656"], ["updated_at", "2016-05-09 13:09:27.676656"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:09:27.690932"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:09:27.703889"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:09:27.710333"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:09:27.717687"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:09:27.725329"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:09:27.730975"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:09:27.741913"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:09:27.746721"], ["updated_at", "2016-05-09 13:09:27.746721"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:09:27.752418"], ["updated_at", "2016-05-09 13:09:27.752418"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:09:27.753679"], ["updated_at", "2016-05-09 13:09:27.753679"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:09:27.754910"], ["updated_at", "2016-05-09 13:09:27.754910"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47721 spawn> child PID = 47726 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a930106c-028a-4ee1-80c8-acd4f9a45ffa] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a930106c-028a-4ee1-80c8-acd4f9a45ffa] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.82ms spawn> child[47726] took 0.119679 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47721 spawn> child PID = 47727 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:09:35.038370"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca]  (4928.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca]  (0.3ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [94730f95-59f9-452e-8dcd-59231a4f28ca] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 11952.26ms spawn> Exception in child[47727] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47727] took 12.053281 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e852963d505bdc7f1800a188c5783e01"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "e852963d505bdc7f1800a188c5783e01"], ["created_at", "2016-05-09 13:09:39.990389"], ["updated_at", "2016-05-09 13:09:39.990389"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.2ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 4ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47721 spawn> child PID = 47731  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: face6616-423a-414b-982d-b19aa3f3c87d) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: face6616-423a-414b-982d-b19aa3f3c87d\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:09:40.185495"], ["created_at", "2016-05-09 13:09:40.185929"], ["updated_at", "2016-05-09 13:09:40.185929"]] [ActiveJob]  (4934.1ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (0.7ms) rollback transaction spawn> Exception in child[47731] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47731] took 5.046586 sec  (0.7ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47721 spawn> child PID = 47732  (0.8ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:09:45.232481"], ["id", 1039265257]]  (4928.0ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.6ms) rollback transaction spawn> Exception in child[47732] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47732] took 5.014296 sec  (0.5ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47721 spawn> child PID = 47733  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:09:50.261265"], ["id", 1039265257]]  (4928.1ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.8ms) rollback transaction spawn> Exception in child[47733] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47733] took 5.005386 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47721 spawn> child PID = 47736  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:09:55.290998"], ["id", 1039265257]]  (4927.0ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (1.2ms) rollback transaction spawn> Exception in child[47736] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47736] took 4.999296 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47721 spawn> child PID = 47737 spawn> child[47737] took 0.003971 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47721 spawn> child PID = 47738  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47738] took 0.054664 sec  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47721 spawn> child PID = 47739 spawn> child[47739] took 0.0057 sec  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47721 spawn> child PID = 47740  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47740] took 0.060132 sec  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:10:00.457761"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.2ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.7ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47721 spawn> child PID = 47741 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.3ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:10:00.519200"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 14ms (Views: 4.1ms | ActiveRecord: 2.0ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47741] took 0.049131 sec  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "886c26fbb4c6e9f98ee5b23d48ad5b42"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "886c26fbb4c6e9f98ee5b23d48ad5b42"], ["created_at", "2016-05-09 13:10:00.544438"], ["updated_at", "2016-05-09 13:10:00.544438"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cf3e05294fec288c91634f0dc53b775d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cf3e05294fec288c91634f0dc53b775d"], ["created_at", "2016-05-09 13:10:00.548203"], ["updated_at", "2016-05-09 13:10:00.548203"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "388c6d6b01dff3258f1b049ebdbf248b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "388c6d6b01dff3258f1b049ebdbf248b"], ["created_at", "2016-05-09 13:10:00.553936"], ["updated_at", "2016-05-09 13:10:00.553936"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ec20cb2e9a6821c6968dfdea6e298eb7"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ec20cb2e9a6821c6968dfdea6e298eb7"], ["created_at", "2016-05-09 13:10:00.557413"], ["updated_at", "2016-05-09 13:10:00.557413"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "24e5a92a2724f70568cf05019fb4f648"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "24e5a92a2724f70568cf05019fb4f648"], ["created_at", "2016-05-09 13:10:00.561641"], ["updated_at", "2016-05-09 13:10:00.561641"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:10:00.569653"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47721 spawn> child PID = 47742 Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction spawn> child[47742] took 0.077741 sec  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.2ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:10:45', '2016-05-09 13:10:45', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:10:45', '2016-05-09 13:10:45', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:10:45', '2016-05-09 13:10:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:10:45', '2016-05-09 13:10:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:10:45', '2016-05-09 13:10:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:10:45', '2016-05-09 13:10:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:10:45', '2016-05-09 13:10:45', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3e1cd3cca961c4f63f86f8561e600a11"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "3e1cd3cca961c4f63f86f8561e600a11"], ["created_at", "2016-05-09 13:10:45.948283"], ["updated_at", "2016-05-09 13:10:45.948283"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 22ms (Views: 2.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 8ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47760 spawn> child PID = 47761  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: bf81dc52-3e18-4ce4-acb1-6d403c331775) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.6ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: bf81dc52-3e18-4ce4-acb1-6d403c331775\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:10:46.131863"], ["created_at", "2016-05-09 13:10:46.132298"], ["updated_at", "2016-05-09 13:10:46.132298"]] [ActiveJob]  (4927.3ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (0.7ms) rollback transaction spawn> Exception in child[47761] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47761] took 5.053308 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47760 spawn> child PID = 47765  (0.6ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:10:51.169316"], ["id", 1039265257]]  (4928.3ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.8ms) rollback transaction spawn> Exception in child[47765] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47765] took 5.014632 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47760 spawn> child PID = 47772  (0.4ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:10:56.207176"], ["id", 1039265257]]  (4931.0ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.6ms) rollback transaction spawn> Exception in child[47772] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47772] took 5.013364 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47760 spawn> child PID = 47774  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:11:01.245206"], ["id", 1039265257]]  (4932.7ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.9ms) rollback transaction spawn> Exception in child[47774] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47774] took 5.016367 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47760 spawn> child PID = 47775 spawn> child[47775] took 0.004339 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47760 spawn> child PID = 47776  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47776] took 0.06182 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47760 spawn> child PID = 47777 spawn> child[47777] took 0.00346 sec  (0.2ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47760 spawn> child PID = 47778  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47778] took 0.058927 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.2ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:11:06.432183"], ["updated_at", "2016-05-09 13:11:06.432183"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:11:06.437898"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:11:06.444629"], ["updated_at", "2016-05-09 13:11:06.444629"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:11:06.447310"], ["updated_at", "2016-05-09 13:11:06.447310"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 33ms (Views: 4.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2057e85120c75aca0f261cbb4bf14d98"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "2057e85120c75aca0f261cbb4bf14d98"], ["created_at", "2016-05-09 13:11:06.534554"], ["updated_at", "2016-05-09 13:11:06.534554"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:11:06.542117"], ["updated_at", "2016-05-09 13:11:06.542117"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.6ms | ActiveRecord: 0.3ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3cee425c8873f47caa5c0656d4b1927a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3cee425c8873f47caa5c0656d4b1927a"], ["created_at", "2016-05-09 13:11:06.584690"], ["updated_at", "2016-05-09 13:11:06.584690"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "18b10ed58bc6965533b38335f5f10f76"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "18b10ed58bc6965533b38335f5f10f76"], ["created_at", "2016-05-09 13:11:06.587509"], ["updated_at", "2016-05-09 13:11:06.587509"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e0f3b3e2a1566173ede46cbbbcd4f526"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e0f3b3e2a1566173ede46cbbbcd4f526"], ["created_at", "2016-05-09 13:11:06.592379"], ["updated_at", "2016-05-09 13:11:06.592379"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "82d0c0e3a0c116d7f72f9ca9c618e084"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "82d0c0e3a0c116d7f72f9ca9c618e084"], ["created_at", "2016-05-09 13:11:06.594939"], ["updated_at", "2016-05-09 13:11:06.594939"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "261e85afe1244c1f9edd5395b08ff27a"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "261e85afe1244c1f9edd5395b08ff27a"], ["created_at", "2016-05-09 13:11:06.598442"], ["updated_at", "2016-05-09 13:11:06.598442"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:11:06.605809"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47760 spawn> child PID = 47779 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:11:06.696827"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[47779] took 0.075394 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:11:06.721057"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47760 spawn> child PID = 47780 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [871423a2-825d-40fc-a613-8216815a3ca1] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [871423a2-825d-40fc-a613-8216815a3ca1] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2.95ms spawn> child[47780] took 0.083812 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47760 spawn> child PID = 47781 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:11:09.905005"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25]  (4931.5ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25]  (0.6ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [4b66694d-c4db-48dc-8d09-589735ad9d25] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 7906.07ms spawn> Exception in child[47781] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47781] took 7.98563 sec  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:11:14.855749"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:11:14.862082"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:11:14.867473"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:11:14.874549"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:11:14.880408"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:11:14.888434"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47760 spawn> child PID = 47787 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.0ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 9ms (Views: 3.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47787] took 0.045112 sec  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:11:14.976310"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:11:14.984707"], ["updated_at", "2016-05-09 13:11:14.984707"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:11:14.992737"], ["updated_at", "2016-05-09 13:11:14.992737"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:11:14.994013"], ["updated_at", "2016-05-09 13:11:14.994013"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:11:14.995157"], ["updated_at", "2016-05-09 13:11:14.995157"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.1ms) DELETE FROM "fogged_resources" Fixture Insert (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:20:54', '2016-05-09 13:20:54', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:20:54', '2016-05-09 13:20:54', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:20:54', '2016-05-09 13:20:54', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:20:54', '2016-05-09 13:20:54', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:20:54', '2016-05-09 13:20:54', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:20:54', '2016-05-09 13:20:54', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:20:54', '2016-05-09 13:20:54', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 45ms (Views: 4.5ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.5ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fe6386e9897f6034335cdb5965d5b9da"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "fe6386e9897f6034335cdb5965d5b9da"], ["created_at", "2016-05-09 13:20:54.995583"], ["updated_at", "2016-05-09 13:20:54.995583"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:20:55.006349"], ["updated_at", "2016-05-09 13:20:55.006349"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 1.9ms | ActiveRecord: 0.5ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.6ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:20:55.059016"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.5ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3c147910abfd175ec20614e6af09b4d6"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3c147910abfd175ec20614e6af09b4d6"], ["created_at", "2016-05-09 13:20:55.074582"], ["updated_at", "2016-05-09 13:20:55.074582"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5803a4f6b8d5603c216ccf7c477a752e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5803a4f6b8d5603c216ccf7c477a752e"], ["created_at", "2016-05-09 13:20:55.078903"], ["updated_at", "2016-05-09 13:20:55.078903"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ce05f8944c401701e9c12ba519e7d86a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ce05f8944c401701e9c12ba519e7d86a"], ["created_at", "2016-05-09 13:20:55.084368"], ["updated_at", "2016-05-09 13:20:55.084368"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "743b895ad45156a6d0abc4a3103427bc"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "743b895ad45156a6d0abc4a3103427bc"], ["created_at", "2016-05-09 13:20:55.087335"], ["updated_at", "2016-05-09 13:20:55.087335"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cbf0af21c243ff33026578c524c2c77c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cbf0af21c243ff33026578c524c2c77c"], ["created_at", "2016-05-09 13:20:55.091701"], ["updated_at", "2016-05-09 13:20:55.091701"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:20:55.109670"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 48036 spawn> child PID = 48038 Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:20:55.236914"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[48038] took 0.113139 sec  (0.9ms) rollback transaction  (0.6ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:20:55.262058"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:20:55.268995"], ["updated_at", "2016-05-09 13:20:55.268995"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:20:55.277289"], ["updated_at", "2016-05-09 13:20:55.277289"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:20:55.279034"], ["updated_at", "2016-05-09 13:20:55.279034"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:20:55.280503"], ["updated_at", "2016-05-09 13:20:55.280503"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:20:55.290650"], ["updated_at", "2016-05-09 13:20:55.290650"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:20:55.296215"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:20:55.300797"], ["updated_at", "2016-05-09 13:20:55.300797"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:20:55.303322"], ["updated_at", "2016-05-09 13:20:55.303322"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "22fbdf1c4d07353a557e60c581304602"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "22fbdf1c4d07353a557e60c581304602"], ["created_at", "2016-05-09 13:20:55.310295"], ["updated_at", "2016-05-09 13:20:55.310295"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.3ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 48036 spawn> child PID = 48039  (1.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: c1a480d8-d4b2-41a1-b1de-7077b74714ee) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.2ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: c1a480d8-d4b2-41a1-b1de-7077b74714ee\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:20:55.482489"], ["created_at", "2016-05-09 13:20:55.482954"], ["updated_at", "2016-05-09 13:20:55.482954"]] [ActiveJob]  (4929.3ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (4.7ms) rollback transaction spawn> Exception in child[48039] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48039] took 5.058089 sec  (0.2ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48036 spawn> child PID = 48041  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:21:00.518792"], ["id", 1039265257]]  (4931.8ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.7ms) rollback transaction spawn> Exception in child[48041] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48041] took 5.013016 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48036 spawn> child PID = 48042  (0.6ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:21:05.558807"], ["id", 1039265257]]  (4926.2ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.3ms) rollback transaction spawn> Exception in child[48042] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48042] took 5.005461 sec  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48036 spawn> child PID = 48043  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:21:10.590191"], ["id", 1039265257]]  (4929.6ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.9ms) rollback transaction spawn> Exception in child[48043] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48043] took 5.014646 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 48036 spawn> child PID = 48045 spawn> child[48045] took 0.003358 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 48036 spawn> child PID = 48046  (0.8ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48046] took 0.061234 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 48036 spawn> child PID = 48047 spawn> child[48047] took 0.003611 sec  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 48036 spawn> child PID = 48048  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.4ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48048] took 0.060322 sec  (0.2ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 3ms (Views: 1.6ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:21:15.790640"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:21:15.796112"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.9ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:21:15.801361"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:21:15.808582"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:21:15.814426"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:21:15.823169"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 48036 spawn> child PID = 48049 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 10ms (Views: 3.5ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[48049] took 0.043065 sec  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48036 spawn> child PID = 48050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c37bc312-b633-438c-be61-bf9e9c7f5074] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c37bc312-b633-438c-be61-bf9e9c7f5074] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.31ms spawn> child[48050] took 0.093554 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48036 spawn> child PID = 48051 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0] SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:21:17.895904"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0]  (4927.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0]  (0.4ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [88b41063-cdd7-4257-90ff-64f3092085d0] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 6712.54ms spawn> Exception in child[48051] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48051] took 6.795783 sec  (0.2ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:21:43', '2016-05-09 13:21:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:21:43', '2016-05-09 13:21:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:21:43', '2016-05-09 13:21:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:21:43', '2016-05-09 13:21:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:21:43', '2016-05-09 13:21:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:21:43', '2016-05-09 13:21:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:21:43', '2016-05-09 13:21:43', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:21:43.751084"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.8ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48062 spawn> child PID = 48065 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [21450056-93b7-4af3-8b47-90e8688d58f8] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [21450056-93b7-4af3-8b47-90e8688d58f8] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.03ms spawn> child[48065] took 0.111415 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48062 spawn> child PID = 48066 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:21:47.513085"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf]  (4925.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf]  (4.8ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [0fe69182-f01c-4c7b-862f-f482da45b3cf] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 8435.8ms spawn> Exception in child[48066] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48066] took 8.526704 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 48062 spawn> child PID = 48073  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 9383f2e3-ca11-4751-829b-b60559e81208) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.9ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 9383f2e3-ca11-4751-829b-b60559e81208\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:21:52.600542"], ["created_at", "2016-05-09 13:21:52.601020"], ["updated_at", "2016-05-09 13:21:52.601020"]] [ActiveJob]  (4930.2ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (4.9ms) rollback transaction spawn> Exception in child[48073] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48073] took 5.065564 sec  (0.8ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48062 spawn> child PID = 48076  (0.5ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:21:57.649589"], ["id", 1039265257]]  (4931.4ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.7ms) rollback transaction spawn> Exception in child[48076] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48076] took 5.026016 sec  (0.6ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48062 spawn> child PID = 48078  (1.0ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:22:02.692865"], ["id", 1039265257]]  (4929.4ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.8ms) rollback transaction spawn> Exception in child[48078] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48078] took 5.013124 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48062 spawn> child PID = 48079  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:22:07.728971"], ["id", 1039265257]]  (4926.2ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.3ms) rollback transaction spawn> Exception in child[48079] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48079] took 5.001634 sec  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 48062 spawn> child PID = 48081 spawn> child[48081] took 0.004882 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 48062 spawn> child PID = 48082  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48082] took 0.058766 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 48062 spawn> child PID = 48083 spawn> child[48083] took 0.004345 sec  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 48062 spawn> child PID = 48084  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48084] took 0.066202 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "42f1db291e450c4c6da8bf596def0196"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "42f1db291e450c4c6da8bf596def0196"], ["created_at", "2016-05-09 13:22:12.909856"], ["updated_at", "2016-05-09 13:22:12.909856"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.4ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 13ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:22:12.957983"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 1.6ms | ActiveRecord: 0.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 48062 spawn> child PID = 48085 Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:22:13.023410"], ["id", 335514824]]  (0.8ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 15ms (Views: 4.1ms | ActiveRecord: 1.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[48085] took 0.052347 sec  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "19721dae5e268ced8636d9cbb58c6d9d"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "19721dae5e268ced8636d9cbb58c6d9d"], ["created_at", "2016-05-09 13:22:13.075710"], ["updated_at", "2016-05-09 13:22:13.075710"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "60251c67c5d45f249665b9a85064da4a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "60251c67c5d45f249665b9a85064da4a"], ["created_at", "2016-05-09 13:22:13.079160"], ["updated_at", "2016-05-09 13:22:13.079160"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b6c6e1364ab1ba785d49f06a36b96cef"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b6c6e1364ab1ba785d49f06a36b96cef"], ["created_at", "2016-05-09 13:22:13.084953"], ["updated_at", "2016-05-09 13:22:13.084953"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9c9638d251bdd2f9635319bcb8748694"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9c9638d251bdd2f9635319bcb8748694"], ["created_at", "2016-05-09 13:22:13.088654"], ["updated_at", "2016-05-09 13:22:13.088654"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0a8da88d1f866bff297988d508e27e44"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0a8da88d1f866bff297988d508e27e44"], ["created_at", "2016-05-09 13:22:13.092986"], ["updated_at", "2016-05-09 13:22:13.092986"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (1.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.3ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:22:13.101618"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 48062 spawn> child PID = 48086 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction spawn> child[48086] took 0.08685 sec  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 51ms (Views: 7.3ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0f44aaf1f7a8cbb5f3e1a4ffaa4334e2"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "0f44aaf1f7a8cbb5f3e1a4ffaa4334e2"], ["created_at", "2016-05-09 13:22:13.301261"], ["updated_at", "2016-05-09 13:22:13.301261"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:22:13.312185"], ["updated_at", "2016-05-09 13:22:13.312185"]]  (0.2ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 2.1ms | ActiveRecord: 0.5ms)  (1.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:22:13.365973"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:22:13.371477"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.3ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:22:13.376707"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:22:13.384350"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:22:13.391383"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:22:13.403006"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:22:13.409058"], ["updated_at", "2016-05-09 13:22:13.409058"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:22:13.415215"], ["updated_at", "2016-05-09 13:22:13.415215"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:22:13.416426"], ["updated_at", "2016-05-09 13:22:13.416426"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:22:13.417702"], ["updated_at", "2016-05-09 13:22:13.417702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:22:13.428053"], ["updated_at", "2016-05-09 13:22:13.428053"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:22:13.435893"], ["id", 701625837]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:22:13.442533"], ["updated_at", "2016-05-09 13:22:13.442533"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:22:13.446312"], ["updated_at", "2016-05-09 13:22:13.446312"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 431685987) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:23:37', '2016-05-09 13:23:37', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:23:37', '2016-05-09 13:23:37', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:23:37', '2016-05-09 13:23:37', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:23:37', '2016-05-09 13:23:37', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:23:37', '2016-05-09 13:23:37', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:23:37', '2016-05-09 13:23:37', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 624739301) Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:23:37', '2016-05-09 13:23:37', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "78b57667047f2bd9a4a7558dfe5c1b1e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "78b57667047f2bd9a4a7558dfe5c1b1e"], ["created_at", "2016-05-09 13:23:38.025985"], ["updated_at", "2016-05-09 13:23:38.025985"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7b467c7664334d20f8519fe18ed7ecb8"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7b467c7664334d20f8519fe18ed7ecb8"], ["created_at", "2016-05-09 13:23:38.029608"], ["updated_at", "2016-05-09 13:23:38.029608"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2bb0845565fe571ba31194eea24ea696"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2bb0845565fe571ba31194eea24ea696"], ["created_at", "2016-05-09 13:23:38.034649"], ["updated_at", "2016-05-09 13:23:38.034649"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f2fbfc1bf6892aa1765dfd8e3aed1020"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f2fbfc1bf6892aa1765dfd8e3aed1020"], ["created_at", "2016-05-09 13:23:38.037422"], ["updated_at", "2016-05-09 13:23:38.037422"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "96bc35845662b385627f7928dba8c93c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "96bc35845662b385627f7928dba8c93c"], ["created_at", "2016-05-09 13:23:38.042471"], ["updated_at", "2016-05-09 13:23:38.042471"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.2ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:23:38.059434"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 48103 spawn> child PID = 48104 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:23:38.150251"], ["id", 335514824]]  (0.9ms) commit transaction spawn> child[48104] took 0.071116 sec  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:24:22', '2016-05-09 13:24:22', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:24:22', '2016-05-09 13:24:22', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:24:22', '2016-05-09 13:24:22', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:24:22', '2016-05-09 13:24:22', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:24:22', '2016-05-09 13:24:22', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:24:22', '2016-05-09 13:24:22', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:24:22', '2016-05-09 13:24:22', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:24:22.169071"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 11ms (Views: 2.2ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48117 spawn> child PID = 48118 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b3b5907a-5ad5-4c94-8a3a-a49eb35300f9] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [b3b5907a-5ad5-4c94-8a3a-a49eb35300f9] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.11ms spawn> child[48118] took 0.10624 sec  (0.2ms) rollback transaction  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48117 spawn> child PID = 48119 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:24:24.241789"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390]  (4933.2ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390]  (0.6ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [6addce57-5500-43a8-9ddb-e58dbdb9a390] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 6759.56ms spawn> Exception in child[48119] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48119] took 6.842416 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 48117 spawn> child PID = 48124  (1.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: a40cc36e-7d47-47c1-8d74-352dffe52bdd) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.1ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: a40cc36e-7d47-47c1-8d74-352dffe52bdd\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:24:29.325448"], ["created_at", "2016-05-09 13:24:29.325839"], ["updated_at", "2016-05-09 13:24:29.325839"]] [ActiveJob]  (4928.8ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (4.9ms) rollback transaction spawn> Exception in child[48124] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48124] took 5.05511 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48117 spawn> child PID = 48125  (0.4ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:24:34.368223"], ["id", 1039265257]]  (4932.2ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.3ms) rollback transaction spawn> Exception in child[48125] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48125] took 5.01467 sec  (0.3ms) rollback transaction  (0.2ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48117 spawn> child PID = 48126  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:24:39.395217"], ["id", 1039265257]]  (4928.5ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.5ms) rollback transaction spawn> Exception in child[48126] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48126] took 5.002429 sec  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48117 spawn> child PID = 48128  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:24:44.432341"], ["id", 1039265257]]  (4930.3ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.6ms) rollback transaction spawn> Exception in child[48128] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48128] took 5.015299 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 48117 spawn> child PID = 48129 spawn> child[48129] took 0.004168 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 48117 spawn> child PID = 48130  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48130] took 0.054838 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 48117 spawn> child PID = 48131 spawn> child[48131] took 0.004083 sec  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 48117 spawn> child PID = 48132  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48132] took 0.055552 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6e17e7da090371a931ddf547b96a94ba"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "6e17e7da090371a931ddf547b96a94ba"], ["created_at", "2016-05-09 13:24:49.602317"], ["updated_at", "2016-05-09 13:24:49.602317"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.3ms | ActiveRecord: 0.6ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 11ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:24:49.646755"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 48117 spawn> child PID = 48133 Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:24:49.705740"], ["id", 335514824]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 14ms (Views: 3.5ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[48133] took 0.051537 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.8ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ea5530ae24ce565fcf514ee1612f6473"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ea5530ae24ce565fcf514ee1612f6473"], ["created_at", "2016-05-09 13:24:49.757750"], ["updated_at", "2016-05-09 13:24:49.757750"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3b69fc0d91a8f3ba9957cc32989781fa"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3b69fc0d91a8f3ba9957cc32989781fa"], ["created_at", "2016-05-09 13:24:49.761287"], ["updated_at", "2016-05-09 13:24:49.761287"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "856662bc1040a62e45aa5c9fbbc66a58"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "856662bc1040a62e45aa5c9fbbc66a58"], ["created_at", "2016-05-09 13:24:49.767679"], ["updated_at", "2016-05-09 13:24:49.767679"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4b5b5fc6941bc8de2efb09b064b2ada2"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4b5b5fc6941bc8de2efb09b064b2ada2"], ["created_at", "2016-05-09 13:24:49.771061"], ["updated_at", "2016-05-09 13:24:49.771061"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "494c65b9f759b7d98c83dc360544d8ea"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "494c65b9f759b7d98c83dc360544d8ea"], ["created_at", "2016-05-09 13:24:49.775021"], ["updated_at", "2016-05-09 13:24:49.775021"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.3ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:24:49.783000"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 48117 spawn> child PID = 48134 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction spawn> child[48134] took 0.082824 sec  (0.2ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 43ms (Views: 4.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fc5852bbc7f2ccd7b2dbda301159eba7"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "fc5852bbc7f2ccd7b2dbda301159eba7"], ["created_at", "2016-05-09 13:24:49.967853"], ["updated_at", "2016-05-09 13:24:49.967853"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:24:49.980278"], ["updated_at", "2016-05-09 13:24:49.980278"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 1.8ms | ActiveRecord: 0.3ms)  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 4.0ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:24:50.028212"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:24:50.033087"], ["id", 1039265257]]  (0.3ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:24:50.038770"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:24:50.045645"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:24:50.051056"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:24:50.062447"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:24:50.067995"], ["updated_at", "2016-05-09 13:24:50.067995"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.4ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:24:50.074227"], ["updated_at", "2016-05-09 13:24:50.074227"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:24:50.076202"], ["updated_at", "2016-05-09 13:24:50.076202"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:24:50.077899"], ["updated_at", "2016-05-09 13:24:50.077899"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:24:50.087802"], ["updated_at", "2016-05-09 13:24:50.087802"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:24:50.092633"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:24:50.096126"], ["updated_at", "2016-05-09 13:24:50.096126"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:24:50.098438"], ["updated_at", "2016-05-09 13:24:50.098438"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:26:32', '2016-05-09 13:26:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:26:32', '2016-05-09 13:26:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:26:32', '2016-05-09 13:26:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:26:32', '2016-05-09 13:26:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:26:32', '2016-05-09 13:26:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:26:32', '2016-05-09 13:26:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:26:32', '2016-05-09 13:26:32', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:26:32.231081"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48154 spawn> child PID = 48155 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [28387916-5b7a-45d4-8fbe-dce8ba3c1338] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [28387916-5b7a-45d4-8fbe-dce8ba3c1338] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.52ms spawn> child[48155] took 0.086924 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48154 spawn> child PID = 48156 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:26:34.226488"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48]  (4931.4ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48] SQLite3::BusyException: database is locked: commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48]  (0.9ms) rollback transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [99d33178-9126-4b98-acd0-16276e0fec48] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 6711.7ms spawn> Exception in child[48156] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:240:in `update_attribute' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:321:in `increment!' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:31:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:20:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/jobs/fogged/resources/aws_thumbnail_job_test.rb:13:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48156] took 6.791806 sec  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 48154 spawn> child PID = 48159  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 71710e26-64ac-4dbe-bc3c-2844e96a09c8) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 71710e26-64ac-4dbe-bc3c-2844e96a09c8\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:26:39.299961"], ["created_at", "2016-05-09 13:26:39.300405"], ["updated_at", "2016-05-09 13:26:39.300405"]] [ActiveJob]  (4933.3ms) commit transaction [ActiveJob] SQLite3::BusyException: database is locked: commit transaction [ActiveJob]  (4.9ms) rollback transaction spawn> Exception in child[48159] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:286:in `block in save' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:301:in `rollback_active_record_state!' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:285:in `save' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:35:in `block (2 levels) in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:61:in `block in initialize' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `call' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:66:in `execute' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/lifecycle.rb:40:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:33:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `tap' /Users/david/.gem/ruby/2.2.2/gems/delayed_job-4.0.6/lib/delayed/backend/base.rb:32:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/queue_adapters/delayed_job_adapter.rb:18:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:71:in `block in enqueue' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:14:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:13:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_enqueue_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:67:in `enqueue' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/enqueuing.rb:17:in `perform_later' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:18:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:96:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:95:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:88:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48159] took 5.053756 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48154 spawn> child PID = 48161  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:26:44.334438"], ["id", 1039265257]]  (4924.2ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.8ms) rollback transaction spawn> Exception in child[48161] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:48:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:40:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48161] took 5.00182 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48154 spawn> child PID = 48162  (1.8ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:26:49.386217"], ["id", 1039265257]]  (4927.3ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (0.5ms) rollback transaction spawn> Exception in child[48162] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:126:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48162] took 5.024847 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48154 spawn> child PID = 48163  (0.4ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:26:54.415591"], ["id", 1039265257]]  (4929.1ms) commit transaction SQLite3::BusyException: database is locked: commit transaction  (4.8ms) rollback transaction spawn> Exception in child[48163] - ActiveRecord::StatementInvalid: SQLite3::BusyException: database is locked: commit transaction spawn> /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `step' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:108:in `block in each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `loop' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/statement.rb:107:in `each' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `map' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:149:in `block in execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:95:in `prepare' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:134:in `execute' /Users/david/.gem/ruby/2.2.2/gems/sqlite3-1.3.10/lib/sqlite3/database.rb:517:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `block in commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/sqlite3_adapter.rb:357:in `commit_db_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:155:in `commit' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:179:in `commit_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:198:in `within_new_transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:220:in `transaction' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/transactions.rb:344:in `with_transaction_returning_status' /Users/david/.gem/ruby/2.2.2/gems/activerecord-4.2.1/lib/active_record/persistence.rb:262:in `update!' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:42:in `encode_video' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:9:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:148:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:40:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:38:in `new' /Users/david/projects/fogged/test/test_helper.rb:38:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:138:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[48163] took 5.011054 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 48154 spawn> child PID = 48166 spawn> child[48166] took 0.004356 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 48154 spawn> child PID = 48167  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48167] took 0.057022 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 48154 spawn> child PID = 48168 spawn> child[48168] took 0.004217 sec  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 48154 spawn> child PID = 48169  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48169] took 0.057476 sec  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e4899f9984f56d60cb23b4ac10157e15"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "e4899f9984f56d60cb23b4ac10157e15"], ["created_at", "2016-05-09 13:26:59.586151"], ["updated_at", "2016-05-09 13:26:59.586151"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 2.1ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 9ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:26:59.628107"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 48154 spawn> child PID = 48170 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:26:59.686257"], ["id", 335514824]]  (0.9ms) commit transaction  (0.0ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 14ms (Views: 3.7ms | ActiveRecord: 1.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[48170] took 0.04815 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.5ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "19b6f8de5c577b7a40bec3271d35543b"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "19b6f8de5c577b7a40bec3271d35543b"], ["created_at", "2016-05-09 13:26:59.740292"], ["updated_at", "2016-05-09 13:26:59.740292"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a2fb95cb44760f3a39d0d45254c1f971"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a2fb95cb44760f3a39d0d45254c1f971"], ["created_at", "2016-05-09 13:26:59.744018"], ["updated_at", "2016-05-09 13:26:59.744018"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c3a8c4dae1d4f4424c62fd0057245307"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c3a8c4dae1d4f4424c62fd0057245307"], ["created_at", "2016-05-09 13:26:59.750362"], ["updated_at", "2016-05-09 13:26:59.750362"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4f8839663928919020fea5f1a93a76d1"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4f8839663928919020fea5f1a93a76d1"], ["created_at", "2016-05-09 13:26:59.753670"], ["updated_at", "2016-05-09 13:26:59.753670"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "75b8f1096e4fd4e2cfa8dc0f16e65f39"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "75b8f1096e4fd4e2cfa8dc0f16e65f39"], ["created_at", "2016-05-09 13:26:59.757942"], ["updated_at", "2016-05-09 13:26:59.757942"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:26:59.767133"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 48154 spawn> child PID = 48175 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction  (0.1ms) commit transaction spawn> child[48175] took 0.079578 sec  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 32ms (Views: 4.2ms | ActiveRecord: 0.4ms) Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.3ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 8ms (Views: 2.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "fbdaced3b47da08a57321eb3ace44fa2"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "fbdaced3b47da08a57321eb3ace44fa2"], ["created_at", "2016-05-09 13:27:30.402293"], ["updated_at", "2016-05-09 13:27:30.402293"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:27:30.412279"], ["updated_at", "2016-05-09 13:27:30.412279"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.1ms | ActiveRecord: 0.3ms)  (5.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 4.1ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:27:30.462319"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:27:30.466818"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:27:30.471327"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:27:30.477308"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:27:30.498219"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:27:30.508251"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:27:30.514121"], ["updated_at", "2016-05-09 13:27:30.514121"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:27:30.519971"], ["updated_at", "2016-05-09 13:27:30.519971"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:27:30.521192"], ["updated_at", "2016-05-09 13:27:30.521192"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:27:30.522246"], ["updated_at", "2016-05-09 13:27:30.522246"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:27:30.531180"], ["updated_at", "2016-05-09 13:27:30.531180"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:27:30.535123"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:27:30.538944"], ["updated_at", "2016-05-09 13:27:30.538944"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:27:30.541229"], ["updated_at", "2016-05-09 13:27:30.541229"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:29:41', '2016-05-09 13:29:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:29:41', '2016-05-09 13:29:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:41', '2016-05-09 13:29:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:41', '2016-05-09 13:29:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:41', '2016-05-09 13:29:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:41', '2016-05-09 13:29:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:29:41', '2016-05-09 13:29:41', 948421225)  (5.5ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 3ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-05-09 13:29:42.009586"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 2.0ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48376 spawn> child PID = 48380 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a1c213bd-400b-413e-a006-ae8c8808dbf1] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [a1c213bd-400b-413e-a006-ae8c8808dbf1] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.59ms spawn> child[48380] took 0.089563 sec  (0.8ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 48376 spawn> child PID = 48381 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-05-09 13:29:44.501618"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-05-09 13:29:44.766379"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [751d4b8a-8744-426e-a718-60634510d860] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 2502.14ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[48381] took 2.611792 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:29:44', '2016-05-09 13:29:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:29:44', '2016-05-09 13:29:44', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:44', '2016-05-09 13:29:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:44', '2016-05-09 13:29:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:44', '2016-05-09 13:29:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:44', '2016-05-09 13:29:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:29:44', '2016-05-09 13:29:44', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 48376 spawn> child PID = 48385  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: f6a9b7e0-bc57-40c0-93f7-020f335b441e) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.2ms) begin transaction [ActiveJob] SQL (0.4ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: f6a9b7e0-bc57-40c0-93f7-020f335b441e\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-05-09 13:29:44.925378"], ["created_at", "2016-05-09 13:29:44.925764"], ["updated_at", "2016-05-09 13:29:44.925764"]] [ActiveJob]  (0.8ms) commit transaction  (0.0ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-05-09 13:29:44.930648"], ["id", 14225656]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48385] took 0.117634 sec  (0.4ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48376 spawn> child PID = 48386  (0.5ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:29:45.032395"], ["id", 1039265257]]  (0.9ms) commit transaction spawn> child[48386] took 0.077362 sec  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48376 spawn> child PID = 48387  (0.5ms) begin transaction  (0.0ms) commit transaction spawn> child[48387] took 0.069906 sec  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 48376 spawn> child PID = 48388  (0.5ms) begin transaction  (0.1ms) commit transaction spawn> child[48388] took 0.076739 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 48376 spawn> child PID = 48389 spawn> child[48389] took 0.004043 sec  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 48376 spawn> child PID = 48390  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48390] took 0.059906 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 48376 spawn> child PID = 48391 spawn> child[48391] took 0.004761 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 48376 spawn> child PID = 48392  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[48392] took 0.071079 sec  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:29:45', '2016-05-09 13:29:45', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:29:45', '2016-05-09 13:29:45', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 153115190) Fixture Delete (0.3ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7416b78aa95450c25e4099b9b221249a"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "7416b78aa95450c25e4099b9b221249a"], ["created_at", "2016-05-09 13:29:45.510531"], ["updated_at", "2016-05-09 13:29:45.510531"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 2.5ms | ActiveRecord: 0.7ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 10ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.3ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 1ms (ActiveRecord: 0.0ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:29:45.566981"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.6ms | ActiveRecord: 0.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.2ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 48376 spawn> child PID = 48393 Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:29:45.640164"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 14ms (Views: 3.7ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[48393] took 0.060495 sec  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 431685987) Fixture Insert (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:29:45', '2016-05-09 13:29:45', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:29:45', '2016-05-09 13:29:45', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.7ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.9ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "012d541d0e89eead79c70b4b7a31ed70"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "012d541d0e89eead79c70b4b7a31ed70"], ["created_at", "2016-05-09 13:29:45.716811"], ["updated_at", "2016-05-09 13:29:45.716811"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d1afc5b5116cda7f969cf630e4df2c2c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d1afc5b5116cda7f969cf630e4df2c2c"], ["created_at", "2016-05-09 13:29:45.720472"], ["updated_at", "2016-05-09 13:29:45.720472"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "60506507199413a0b92c012571714c50"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "60506507199413a0b92c012571714c50"], ["created_at", "2016-05-09 13:29:45.726174"], ["updated_at", "2016-05-09 13:29:45.726174"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "50a4e60acf09899ae7c84198e6dcad67"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "50a4e60acf09899ae7c84198e6dcad67"], ["created_at", "2016-05-09 13:29:45.729272"], ["updated_at", "2016-05-09 13:29:45.729272"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "31c78c57d67cb05c66776a62ff79cc67"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "31c78c57d67cb05c66776a62ff79cc67"], ["created_at", "2016-05-09 13:29:45.733421"], ["updated_at", "2016-05-09 13:29:45.733421"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-05-09 13:29:45.741202"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 48376 spawn> child PID = 48394 Fogged::Resource Load (1.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-05-09 13:29:45.841942"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[48394] took 0.085015 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 433078596) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-05-09 13:29:45', '2016-05-09 13:29:45', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-05-09 13:29:45', '2016-05-09 13:29:45', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-05-09 13:29:45', '2016-05-09 13:29:45', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-05-09 13:29:45', '2016-05-09 13:29:45', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 28ms (Views: 3.7ms | ActiveRecord: 0.3ms) Movie Load (0.5ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.1ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e782fa54d257ca84a7609a3523699eaa"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "e782fa54d257ca84a7609a3523699eaa"], ["created_at", "2016-05-09 13:29:45.928668"], ["updated_at", "2016-05-09 13:29:45.928668"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-05-09 13:29:45.937644"], ["updated_at", "2016-05-09 13:29:45.937644"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.2ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:29:45.976734"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-05-09 13:29:45.981406"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:29:45.987793"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:29:45.993795"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-05-09 13:29:45.999766"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:29:46.013276"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:29:46.018886"], ["updated_at", "2016-05-09 13:29:46.018886"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:29:46.025833"], ["updated_at", "2016-05-09 13:29:46.025833"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-05-09 13:29:46.027194"], ["updated_at", "2016-05-09 13:29:46.027194"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-05-09 13:29:46.028587"], ["updated_at", "2016-05-09 13:29:46.028587"]]  (0.3ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-05-09 13:29:46.040086"], ["updated_at", "2016-05-09 13:29:46.040086"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-05-09 13:29:46.044819"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-05-09 13:29:46.049432"], ["updated_at", "2016-05-09 13:29:46.049432"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-05-09 13:29:46.052172"], ["updated_at", "2016-05-09 13:29:46.052172"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.8ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:49:30', '2016-07-12 13:49:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:49:30', '2016-07-12 13:49:30', 731805050) Fixture Delete (0.4ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 153115190) Fixture Delete (0.9ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:30', '2016-07-12 13:49:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:30', '2016-07-12 13:49:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:30', '2016-07-12 13:49:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:30', '2016-07-12 13:49:30', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:49:30', '2016-07-12 13:49:30', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 2ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-12 13:49:30.490247"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 8ms (Views: 1.7ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.8ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 45355 spawn> child PID = 45357 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [65048b81-05b8-4068-ae5f-194bd7885ac6] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [65048b81-05b8-4068-ae5f-194bd7885ac6] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 3.2ms spawn> child[45357] took 0.102737 sec  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 45355 spawn> child PID = 45358 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb] Performing Fogged::Resources::AWSThumbnailJob from DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb] SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-12 13:49:31.317582"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-12 13:49:31.773663"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb]  (2.2ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e8044793-9ab4-4362-80d0-ac1b1b5928eb] Performed Fogged::Resources::AWSThumbnailJob from DelayedJob(default) in 1060.06ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[45358] took 1.141077 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:49:31', '2016-07-12 13:49:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:49:31', '2016-07-12 13:49:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.2ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "91c47062e34b23b6bc785e7140ff48ce"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "91c47062e34b23b6bc785e7140ff48ce"], ["created_at", "2016-07-12 13:49:31.814382"], ["updated_at", "2016-07-12 13:49:31.814382"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a5f5b6e1ea75802eef59932eb151f562"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a5f5b6e1ea75802eef59932eb151f562"], ["created_at", "2016-07-12 13:49:31.817616"], ["updated_at", "2016-07-12 13:49:31.817616"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dd60c36f1c272b7b6d2fea11c282c94b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dd60c36f1c272b7b6d2fea11c282c94b"], ["created_at", "2016-07-12 13:49:31.823260"], ["updated_at", "2016-07-12 13:49:31.823260"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "9bef1b657ace0a7a6248e18d3ed55a6d"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "9bef1b657ace0a7a6248e18d3ed55a6d"], ["created_at", "2016-07-12 13:49:31.826903"], ["updated_at", "2016-07-12 13:49:31.826903"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "dbf5299192e889a39b363fcc7abc7691"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "dbf5299192e889a39b363fcc7abc7691"], ["created_at", "2016-07-12 13:49:31.831369"], ["updated_at", "2016-07-12 13:49:31.831369"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:49:31.847497"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 45355 spawn> child PID = 45362 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:49:31.950216"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[45362] took 0.084414 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:49:31', '2016-07-12 13:49:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:49:31', '2016-07-12 13:49:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:31', '2016-07-12 13:49:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:49:31', '2016-07-12 13:49:31', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-12 13:49:31.991482"], ["updated_at", "2016-07-12 13:49:31.991482"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 13:49:31.995965"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-12 13:49:31.999924"], ["updated_at", "2016-07-12 13:49:31.999924"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:49:32.002341"], ["updated_at", "2016-07-12 13:49:32.002341"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 45355 spawn> child PID = 45363  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 67031bc1-6dcd-436e-a027-783569668cfe) to DelayedJob(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob]  (0.1ms) begin transaction [ActiveJob] SQL (1.1ms) INSERT INTO "delayed_jobs" ("queue", "handler", "run_at", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["queue", "default"], ["handler", "--- !ruby/object:ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper\njob_data:\n job_class: Fogged::Resources::AWSThumbnailJob\n job_id: 67031bc1-6dcd-436e-a027-783569668cfe\n queue_name: default\n arguments:\n - _aj_globalid: gid://dummy/Fogged::Resource/14225656\n"], ["run_at", "2016-07-12 13:49:32.111974"], ["created_at", "2016-07-12 13:49:32.112434"], ["updated_at", "2016-07-12 13:49:32.112434"]] [ActiveJob]  (0.9ms) commit transaction  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-12 13:49:32.117891"], ["id", 14225656]]  (0.6ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45363] took 0.100509 sec  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45355 spawn> child PID = 45364  (0.5ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:49:32.209000"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[45364] took 0.067255 sec  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45355 spawn> child PID = 45365  (0.5ms) begin transaction  (0.1ms) commit transaction spawn> child[45365] took 0.066102 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45355 spawn> child PID = 45366  (0.4ms) begin transaction  (0.1ms) commit transaction spawn> child[45366] took 0.064614 sec  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 45355 spawn> child PID = 45367 spawn> child[45367] took 0.003872 sec  (0.6ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 45355 spawn> child PID = 45368  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45368] took 0.051257 sec  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 45355 spawn> child PID = 45369 spawn> child[45369] took 0.003706 sec  (0.6ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 45355 spawn> child PID = 45370  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.9ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45370] took 0.055283 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:49:32', '2016-07-12 13:49:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:49:32', '2016-07-12 13:49:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 3ms (Views: 2.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a92dcb792d60beaf03190af0aba66942"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "a92dcb792d60beaf03190af0aba66942"], ["created_at", "2016-07-12 13:49:32.660871"], ["updated_at", "2016-07-12 13:49:32.660871"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.7ms | ActiveRecord: 0.7ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:49:32.696521"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-12 13:49:32.700090"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:49:32.703970"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:49:32.709099"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:49:32.714336"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 24ms (Views: 3.0ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.0ms | ActiveRecord: 0.2ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "6a68709f3b1c59009a367a3cac1ab4f1"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "6a68709f3b1c59009a367a3cac1ab4f1"], ["created_at", "2016-07-12 13:49:32.765431"], ["updated_at", "2016-07-12 13:49:32.765431"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.5ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-12 13:49:32.771820"], ["updated_at", "2016-07-12 13:49:32.771820"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.0ms | ActiveRecord: 0.4ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 2.9ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:49:32.802410"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 0.8ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 45355 spawn> child PID = 45371 Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:49:32.849861"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 12ms (Views: 3.8ms | ActiveRecord: 1.5ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[45371] took 0.0398 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:49:32', '2016-07-12 13:49:32', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:49:32', '2016-07-12 13:49:32', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:49:32', '2016-07-12 13:49:32', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:49:32', '2016-07-12 13:49:32', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 13:49:32.891469"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:49:32.897204"], ["updated_at", "2016-07-12 13:49:32.897204"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:49:32.904679"], ["updated_at", "2016-07-12 13:49:32.904679"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-12 13:49:32.906123"], ["updated_at", "2016-07-12 13:49:32.906123"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-12 13:49:32.907641"], ["updated_at", "2016-07-12 13:49:32.907641"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:50:52', '2016-07-12 13:50:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:50:52', '2016-07-12 13:50:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:50:52', '2016-07-12 13:50:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:50:52', '2016-07-12 13:50:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:50:52', '2016-07-12 13:50:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:50:52', '2016-07-12 13:50:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:50:52', '2016-07-12 13:50:52', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "448b2f46ebaa5a5fd2ea0ae7647ff1c4"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "448b2f46ebaa5a5fd2ea0ae7647ff1c4"], ["created_at", "2016-07-12 13:50:52.274879"], ["updated_at", "2016-07-12 13:50:52.274879"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "cc45e92ed69a4caf3c855e30127b663c"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "cc45e92ed69a4caf3c855e30127b663c"], ["created_at", "2016-07-12 13:50:52.278355"], ["updated_at", "2016-07-12 13:50:52.278355"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a30c3a5f3148ab30bcc8cce03a5926c0"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a30c3a5f3148ab30bcc8cce03a5926c0"], ["created_at", "2016-07-12 13:50:52.283267"], ["updated_at", "2016-07-12 13:50:52.283267"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "041734001170c46228a847e63e3429da"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "041734001170c46228a847e63e3429da"], ["created_at", "2016-07-12 13:50:52.285851"], ["updated_at", "2016-07-12 13:50:52.285851"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3c4c63b2b6f5da01a53f3b4382241a71"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3c4c63b2b6f5da01a53f3b4382241a71"], ["created_at", "2016-07-12 13:50:52.290276"], ["updated_at", "2016-07-12 13:50:52.290276"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 45402 spawn> child PID = 45405 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:50:52.385651"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[45405] took 0.070426 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:51:14', '2016-07-12 13:51:14', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:51:14', '2016-07-12 13:51:14', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:14', '2016-07-12 13:51:14', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:14', '2016-07-12 13:51:14', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:14', '2016-07-12 13:51:14', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:14', '2016-07-12 13:51:14', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:51:14', '2016-07-12 13:51:14', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3ba6646a7ccfab56eac1a718619e733e"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "3ba6646a7ccfab56eac1a718619e733e"], ["created_at", "2016-07-12 13:51:14.144291"], ["updated_at", "2016-07-12 13:51:14.144291"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e327f19c11c10692fd75f561cffe6453"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e327f19c11c10692fd75f561cffe6453"], ["created_at", "2016-07-12 13:51:14.147573"], ["updated_at", "2016-07-12 13:51:14.147573"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b0bce5de7ba871b9e5ea25131d2d5f21"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b0bce5de7ba871b9e5ea25131d2d5f21"], ["created_at", "2016-07-12 13:51:14.152042"], ["updated_at", "2016-07-12 13:51:14.152042"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7d11c59830c4ee2f8693c489e910f90c"]] SQL (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7d11c59830c4ee2f8693c489e910f90c"], ["created_at", "2016-07-12 13:51:14.154441"], ["updated_at", "2016-07-12 13:51:14.154441"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2d2b013c244b6c5c7b7d5c5222266932"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2d2b013c244b6c5c7b7d5c5222266932"], ["created_at", "2016-07-12 13:51:14.157932"], ["updated_at", "2016-07-12 13:51:14.157932"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:51:14.169867"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 45419 spawn> child PID = 45421 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:51:14.260441"], ["id", 335514824]]  (1.0ms) commit transaction spawn> child[45421] took 0.070695 sec ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (1.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:51:27', '2016-07-12 13:51:27', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:51:27', '2016-07-12 13:51:27', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:27', '2016-07-12 13:51:27', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:27', '2016-07-12 13:51:27', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:27', '2016-07-12 13:51:27', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:51:27', '2016-07-12 13:51:27', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:51:27', '2016-07-12 13:51:27', 948421225)  (0.8ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:51:27.727499"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:23', '2016-07-12 13:53:23', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:23', '2016-07-12 13:53:23', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:23', '2016-07-12 13:53:23', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:23', '2016-07-12 13:53:23', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:23', '2016-07-12 13:53:23', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:23', '2016-07-12 13:53:23', 779853880, 245026679, 431685987) Fixture Delete (0.4ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:23', '2016-07-12 13:53:23', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 13:53:23.456180"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:53:23.472420"], ["updated_at", "2016-07-12 13:53:23.472420"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:53:23.477638"], ["updated_at", "2016-07-12 13:53:23.477638"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-12 13:53:23.478599"], ["updated_at", "2016-07-12 13:53:23.478599"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-12 13:53:23.479586"], ["updated_at", "2016-07-12 13:53:23.479586"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 45475 spawn> child PID = 45477 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be8ed40d-a6ef-4271-bc09-c8dfe18f85d4] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [be8ed40d-a6ef-4271-bc09-c8dfe18f85d4] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 3.68ms spawn> child[45477] took 0.040713 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 45475 spawn> child PID = 45478 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-12 13:53:25.560498"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-12 13:53:30.889807"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [bbfd0336-a963-41e0-9cb1-ba7903d007e7] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 7302.8ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[45478] took 7.337617 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:30', '2016-07-12 13:53:30', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:30', '2016-07-12 13:53:30', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:30', '2016-07-12 13:53:30', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:30', '2016-07-12 13:53:30', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:30', '2016-07-12 13:53:30', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:30', '2016-07-12 13:53:30', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:30', '2016-07-12 13:53:30', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 18ms (Views: 3.9ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.2ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5f98cda28fe0ad169c4ed05962c6faa9"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "5f98cda28fe0ad169c4ed05962c6faa9"], ["created_at", "2016-07-12 13:53:30.975311"], ["updated_at", "2016-07-12 13:53:30.975311"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-12 13:53:30.978525"], ["updated_at", "2016-07-12 13:53:30.978525"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 6ms (Views: 3.4ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:31.024922"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-12 13:53:31.029778"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:31.034204"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:31.047230"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:31.052401"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:53:31.059714"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.2ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 45475 spawn> child PID = 45487 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:31.121920"], ["id", 335514824]]  (0.7ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 12ms (Views: 3.0ms | ActiveRecord: 1.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[45487] took 0.050159 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:31', '2016-07-12 13:53:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:31', '2016-07-12 13:53:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 624739301) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4a44f1669d8a214ec2ca12eacc411d09"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4a44f1669d8a214ec2ca12eacc411d09"], ["created_at", "2016-07-12 13:53:31.161702"], ["updated_at", "2016-07-12 13:53:31.161702"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2f6a0169cd31d2d4374576c2e1e2a022"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2f6a0169cd31d2d4374576c2e1e2a022"], ["created_at", "2016-07-12 13:53:31.164943"], ["updated_at", "2016-07-12 13:53:31.164943"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a72a6c7ec2fccb4195ce1b3524b16548"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a72a6c7ec2fccb4195ce1b3524b16548"], ["created_at", "2016-07-12 13:53:31.169805"], ["updated_at", "2016-07-12 13:53:31.169805"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a5699b07042ea0fe7de71fcc00dfbdd8"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a5699b07042ea0fe7de71fcc00dfbdd8"], ["created_at", "2016-07-12 13:53:31.172486"], ["updated_at", "2016-07-12 13:53:31.172486"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "270de8e1c95bc9127e38ed043b9dd503"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "270de8e1c95bc9127e38ed043b9dd503"], ["created_at", "2016-07-12 13:53:31.177329"], ["updated_at", "2016-07-12 13:53:31.177329"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.2ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:53:31.184961"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 45475 spawn> child PID = 45488 Fogged::Resource Load (1.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:31.277534"], ["id", 335514824]]  (0.9ms) commit transaction spawn> child[45488] took 0.077526 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:31', '2016-07-12 13:53:31', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:31', '2016-07-12 13:53:31', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:31', '2016-07-12 13:53:31', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:31', '2016-07-12 13:53:31', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-12 13:53:31.313772"], ["updated_at", "2016-07-12 13:53:31.313772"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 13:53:31.318835"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-12 13:53:31.324278"], ["updated_at", "2016-07-12 13:53:31.324278"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:53:31.327885"], ["updated_at", "2016-07-12 13:53:31.327885"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-12 13:53:31.350951"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.7ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "3978fc5252f387e7a584919618cf31e6"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "3978fc5252f387e7a584919618cf31e6"], ["created_at", "2016-07-12 13:53:31.381267"], ["updated_at", "2016-07-12 13:53:31.381267"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 45475 spawn> child PID = 45489  (1.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: cd921110-8b71-41cc-8f65-6c43a1803281) to Test(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:31.495471"], ["id", 14225656]]  (0.6ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45489] took 0.072839 sec  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file_inline ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 45475 spawn> child PID = 45490  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [379c4c94-fc74-4d64-9121-d2733c106909] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [379c4c94-fc74-4d64-9121-d2733c106909] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 840.76ms spawn> Exception in child[45490] - OpenURI::HTTPError: 403 Forbidden spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:19:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:115:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:93:in `assert_no_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:114:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:43:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:40:in `new' /Users/david/projects/fogged/test/test_helper.rb:40:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[45490] took 0.905874 sec  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45475 spawn> child PID = 45491  (0.6ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:32.515442"], ["id", 1039265257]]  (0.7ms) commit transaction spawn> child[45491] took 0.064967 sec  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45475 spawn> child PID = 45492  (0.6ms) begin transaction  (0.1ms) commit transaction spawn> child[45492] took 0.066189 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45475 spawn> child PID = 45493  (0.7ms) begin transaction  (0.0ms) commit transaction spawn> child[45493] took 0.063423 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 45475 spawn> child PID = 45494 spawn> child[45494] took 0.003723 sec  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 45475 spawn> child PID = 45495  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45495] took 0.051164 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 45475 spawn> child PID = 45496 spawn> child[45496] took 0.003798 sec  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 45475 spawn> child PID = 45497  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45497] took 0.048679 sec ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:41', '2016-07-12 13:53:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:41', '2016-07-12 13:53:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:41', '2016-07-12 13:53:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:41', '2016-07-12 13:53:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:41', '2016-07-12 13:53:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:41', '2016-07-12 13:53:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:41', '2016-07-12 13:53:41', 948421225)  (5.1ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 45502 spawn> child PID = 45503  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: e04662b2-3c42-4921-863c-8d94ba32fc2b) to Test(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:41.808308"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45503] took 0.082727 sec  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file_inline ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 45502 spawn> child PID = 45504  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [32e47cc2-bc6a-4c9b-9e0f-84ef995ad150] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [32e47cc2-bc6a-4c9b-9e0f-84ef995ad150] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 1189.21ms spawn> Exception in child[45504] - OpenURI::HTTPError: 403 Forbidden spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:19:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:115:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:93:in `assert_no_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:114:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:43:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:40:in `new' /Users/david/projects/fogged/test/test_helper.rb:40:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[45504] took 1.252299 sec  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45502 spawn> child PID = 45505  (0.4ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:43.191435"], ["id", 1039265257]]  (5.0ms) commit transaction spawn> child[45505] took 0.081592 sec  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45502 spawn> child PID = 45506  (0.4ms) begin transaction  (0.2ms) commit transaction spawn> child[45506] took 0.070334 sec  (0.4ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 45502 spawn> child PID = 45507  (0.4ms) begin transaction  (0.1ms) commit transaction spawn> child[45507] took 0.072352 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 45502 spawn> child PID = 45508 spawn> child[45508] took 0.004047 sec  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 45502 spawn> child PID = 45509  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45509] took 0.054082 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 45502 spawn> child PID = 45510 spawn> child[45510] took 0.004433 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 45502 spawn> child PID = 45511  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[45511] took 0.055546 sec  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:43', '2016-07-12 13:53:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:43', '2016-07-12 13:53:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 948421225)  (0.9ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.2ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 29ms (Views: 4.8ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "843367fee50e2cb319b877bdecd3ee6b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "843367fee50e2cb319b877bdecd3ee6b"], ["created_at", "2016-07-12 13:53:43.700051"], ["updated_at", "2016-07-12 13:53:43.700051"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-12 13:53:43.708661"], ["updated_at", "2016-07-12 13:53:43.708661"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.4ms | ActiveRecord: 0.3ms)  (0.8ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.6ms | ActiveRecord: 0.3ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:43.751550"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-12 13:53:43.756557"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:43.761114"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:43.766766"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 13:53:43.777903"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:53:43.790485"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.2ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 45502 spawn> child PID = 45513 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:43.846652"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 16ms (Views: 3.5ms | ActiveRecord: 1.9ms) Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[45513] took 0.046222 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:43', '2016-07-12 13:53:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:43', '2016-07-12 13:53:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:43', '2016-07-12 13:53:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:43', '2016-07-12 13:53:43', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c06f69cb928f9dc6e581e54f13ed51bd"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c06f69cb928f9dc6e581e54f13ed51bd"], ["created_at", "2016-07-12 13:53:43.886740"], ["updated_at", "2016-07-12 13:53:43.886740"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "0358de4c5609ae09e4aa2716dd7a44ad"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "0358de4c5609ae09e4aa2716dd7a44ad"], ["created_at", "2016-07-12 13:53:43.889799"], ["updated_at", "2016-07-12 13:53:43.889799"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.3ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "5ba207869361a20bc96b746bfa48972b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "5ba207869361a20bc96b746bfa48972b"], ["created_at", "2016-07-12 13:53:43.894738"], ["updated_at", "2016-07-12 13:53:43.894738"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a111a3a0430761db9f83e642cce95a8f"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a111a3a0430761db9f83e642cce95a8f"], ["created_at", "2016-07-12 13:53:43.897165"], ["updated_at", "2016-07-12 13:53:43.897165"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e50b37a3c568960ce4468a5ca243717b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "e50b37a3c568960ce4468a5ca243717b"], ["created_at", "2016-07-12 13:53:43.900785"], ["updated_at", "2016-07-12 13:53:43.900785"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 13:53:43.915645"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 45502 spawn> child PID = 45514 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 13:53:43.994385"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[45514] took 0.064082 sec  (0.4ms) begin transaction Fixture Delete (0.4ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 14225656) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:44', '2016-07-12 13:53:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:44', '2016-07-12 13:53:44', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:44', '2016-07-12 13:53:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:44', '2016-07-12 13:53:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:44', '2016-07-12 13:53:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:44', '2016-07-12 13:53:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:44', '2016-07-12 13:53:44', 948421225)  (1.0ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c5e14837b3835c7be13cac4ca93e6a2e"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "c5e14837b3835c7be13cac4ca93e6a2e"], ["created_at", "2016-07-12 13:53:44.025096"], ["updated_at", "2016-07-12 13:53:44.025096"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.5ms | ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-12 13:53:44.058086"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (Views: 1.1ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-12 13:53:44.070023"], ["updated_at", "2016-07-12 13:53:44.070023"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 13:53:44.073689"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-12 13:53:44.077305"], ["updated_at", "2016-07-12 13:53:44.077305"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:53:44.079957"], ["updated_at", "2016-07-12 13:53:44.079957"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 45502 spawn> child PID = 45515 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fcae96a2-6d69-4b66-b481-8e423a6146bb] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fcae96a2-6d69-4b66-b481-8e423a6146bb] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 4.04ms spawn> child[45515] took 0.033713 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 45502 spawn> child PID = 45516 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b]  (0.8ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-12 13:53:47.137370"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-12 13:53:47.840929"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b]  (1.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [e0798472-c570-4775-b760-edece3b5f32b] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 3643.99ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[45516] took 3.678372 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 701625837) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 13:53:47', '2016-07-12 13:53:47', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 13:53:47', '2016-07-12 13:53:47', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:47', '2016-07-12 13:53:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:47', '2016-07-12 13:53:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:47', '2016-07-12 13:53:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 13:53:47', '2016-07-12 13:53:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 13:53:47', '2016-07-12 13:53:47', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 13:53:47.879512"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:53:47.886111"], ["updated_at", "2016-07-12 13:53:47.886111"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 13:53:47.893366"], ["updated_at", "2016-07-12 13:53:47.893366"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-12 13:53:47.894852"], ["updated_at", "2016-07-12 13:53:47.894852"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-12 13:53:47.896293"], ["updated_at", "2016-07-12 13:53:47.896293"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.3ms) begin transaction Fixture Delete (0.9ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:21:48', '2016-07-12 14:21:48', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:21:48', '2016-07-12 14:21:48', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 153115190) Fixture Delete (1.0ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:48', '2016-07-12 14:21:48', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:48', '2016-07-12 14:21:48', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:48', '2016-07-12 14:21:48', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:48', '2016-07-12 14:21:48', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:21:48', '2016-07-12 14:21:48', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "d4d6cb24d06cee199ec4271175000ee6"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "d4d6cb24d06cee199ec4271175000ee6"], ["created_at", "2016-07-12 14:21:49.024255"], ["updated_at", "2016-07-12 14:21:49.024255"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "39dafe521341388effe6807cbbbb98f9"]] SQL (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "39dafe521341388effe6807cbbbb98f9"], ["created_at", "2016-07-12 14:21:49.028992"], ["updated_at", "2016-07-12 14:21:49.028992"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "852e581ccaa9974ae2039cdc212b0724"]] SQL (0.6ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "852e581ccaa9974ae2039cdc212b0724"], ["created_at", "2016-07-12 14:21:49.035685"], ["updated_at", "2016-07-12 14:21:49.035685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7e7285b4aeab5f0699310c34fff14a28"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "7e7285b4aeab5f0699310c34fff14a28"], ["created_at", "2016-07-12 14:21:49.040286"], ["updated_at", "2016-07-12 14:21:49.040286"]]  (0.2ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1256331474003abe46722124285b71d0"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1256331474003abe46722124285b71d0"], ["created_at", "2016-07-12 14:21:49.047686"], ["updated_at", "2016-07-12 14:21:49.047686"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 14:21:49.063639"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 46161 spawn> child PID = 46163 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.6ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 14:21:49.181840"], ["id", 335514824]]  (0.8ms) commit transaction spawn> child[46163] took 0.100057 sec  (0.8ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:21:49', '2016-07-12 14:21:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:21:49', '2016-07-12 14:21:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:49', '2016-07-12 14:21:49', 419883833, 624739301, 701625837) Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:49', '2016-07-12 14:21:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:49', '2016-07-12 14:21:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:49', '2016-07-12 14:21:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:21:49', '2016-07-12 14:21:49', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 46161 spawn> child PID = 46164  (1.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 898ef53d-bc6e-49e1-9062-0d0beafb9dc6) to Test(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.1ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-12 14:21:49.336063"], ["id", 14225656]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[46164] took 0.108987 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file_inline ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 46161 spawn> child PID = 46165  (0.5ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c5e8cbf8-0e42-4c61-85c0-bfcafb80a9e3] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c5e8cbf8-0e42-4c61-85c0-bfcafb80a9e3] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 862.85ms spawn> Exception in child[46165] - OpenURI::HTTPError: 403 Forbidden spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:19:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:115:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:93:in `assert_no_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:114:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:43:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:40:in `new' /Users/david/projects/fogged/test/test_helper.rb:40:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[46165] took 0.960839 sec  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 46161 spawn> child PID = 46166  (0.7ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 14:21:50.425210"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[46166] took 0.07411 sec  (0.4ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 46161 spawn> child PID = 46167  (0.5ms) begin transaction  (0.1ms) commit transaction spawn> child[46167] took 0.069089 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 46161 spawn> child PID = 46168  (0.7ms) begin transaction  (0.1ms) commit transaction spawn> child[46168] took 0.072015 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 46161 spawn> child PID = 46169 spawn> child[46169] took 0.003676 sec  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 46161 spawn> child PID = 46170  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[46170] took 0.056203 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 46161 spawn> child PID = 46171 spawn> child[46171] took 0.00378 sec  (0.4ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 46161 spawn> child PID = 46172  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[46172] took 0.059835 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:21:50', '2016-07-12 14:21:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:21:50', '2016-07-12 14:21:50', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 14:21:50.869764"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 9ms (Views: 1.9ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 46161 spawn> child PID = 46173 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 14:21:50.924694"], ["id", 335514824]]  (0.9ms) commit transaction  (0.2ms) begin transaction  (0.1ms) commit transaction Completed 200 OK in 14ms (Views: 4.4ms | ActiveRecord: 1.7ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[46173] took 0.043294 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:21:50', '2016-07-12 14:21:50', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:21:50', '2016-07-12 14:21:50', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:50', '2016-07-12 14:21:50', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 245026679) Fixture Insert (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:21:50', '2016-07-12 14:21:50', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 14:21:51.010008"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 14:21:51.016264"], ["updated_at", "2016-07-12 14:21:51.016264"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 14:21:51.022021"], ["updated_at", "2016-07-12 14:21:51.022021"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-12 14:21:51.023523"], ["updated_at", "2016-07-12 14:21:51.023523"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-12 14:21:51.024702"], ["updated_at", "2016-07-12 14:21:51.024702"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:21:51.030271"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-12 14:21:51.034823"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:21:51.039975"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:21:51.051587"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms)  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:21:51.056594"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-12 14:21:51.066371"], ["updated_at", "2016-07-12 14:21:51.066371"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 14:21:51.070627"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-12 14:21:51.074547"], ["updated_at", "2016-07-12 14:21:51.074547"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 14:21:51.077091"], ["updated_at", "2016-07-12 14:21:51.077091"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 13ms (Views: 3.1ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 3ms (Views: 1.9ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7657b25795e6e6db4dc98e34dbac736a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "7657b25795e6e6db4dc98e34dbac736a"], ["created_at", "2016-07-12 14:21:51.120792"], ["updated_at", "2016-07-12 14:21:51.120792"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-12 14:21:51.124281"], ["updated_at", "2016-07-12 14:21:51.124281"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.2ms)  (0.6ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.7ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.3ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 46161 spawn> child PID = 46174 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8f9886c2-54d9-4ea8-8a1b-f69baa5727b3] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8f9886c2-54d9-4ea8-8a1b-f69baa5727b3] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 2.92ms spawn> child[46174] took 0.029191 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 46161 spawn> child PID = 46175 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-12 14:21:51.716454"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0] SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-12 14:21:52.131769"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0]  (0.0ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [2a7b0cb5-cf5b-4187-b16c-8ab94028abe0] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 892.44ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[46175] took 0.924576 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:21:52', '2016-07-12 14:21:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:21:52', '2016-07-12 14:21:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:52', '2016-07-12 14:21:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:52', '2016-07-12 14:21:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:52', '2016-07-12 14:21:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:21:52', '2016-07-12 14:21:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 245026679) Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:21:52', '2016-07-12 14:21:52', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.1ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-12 14:21:52.175458"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "e90d07b30a95b08e5c4945441c1315f3"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "e90d07b30a95b08e5c4945441c1315f3"], ["created_at", "2016-07-12 14:21:52.186798"], ["updated_at", "2016-07-12 14:21:52.186798"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.3ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.0ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:24:15', '2016-07-12 14:24:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:24:15', '2016-07-12 14:24:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 153115190) Fixture Delete (0.2ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 948421225)  (5.0ms) commit transaction  (0.1ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-12 14:24:15.144148"], ["updated_at", "2016-07-12 14:24:15.144148"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 14:24:15.148490"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-12 14:24:15.157552"], ["updated_at", "2016-07-12 14:24:15.157552"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 14:24:15.159833"], ["updated_at", "2016-07-12 14:24:15.159833"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 31ms (Views: 3.8ms | ActiveRecord: 0.5ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.9ms | ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "255e1656e22c5cf8317c18c956215b4b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "255e1656e22c5cf8317c18c956215b4b"], ["created_at", "2016-07-12 14:24:15.219526"], ["updated_at", "2016-07-12 14:24:15.219526"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-12 14:24:15.225706"], ["updated_at", "2016-07-12 14:24:15.225706"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.5ms | ActiveRecord: 0.2ms)  (0.7ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-12 14:24:15.254915"], ["id", 431685987]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 14:24:15.259727"], ["updated_at", "2016-07-12 14:24:15.259727"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-12 14:24:15.264726"], ["updated_at", "2016-07-12 14:24:15.264726"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-12 14:24:15.265714"], ["updated_at", "2016-07-12 14:24:15.265714"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-12 14:24:15.266697"], ["updated_at", "2016-07-12 14:24:15.266697"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "58e7a8924ef0890f675b3b7534619b17"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "58e7a8924ef0890f675b3b7534619b17"], ["created_at", "2016-07-12 14:24:15.270787"], ["updated_at", "2016-07-12 14:24:15.270787"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "197422f0aafecbbc818b135a8013d173"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "197422f0aafecbbc818b135a8013d173"], ["created_at", "2016-07-12 14:24:15.273812"], ["updated_at", "2016-07-12 14:24:15.273812"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.7ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "18338ea16c9b5d6f81053dfbc644ff0a"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "18338ea16c9b5d6f81053dfbc644ff0a"], ["created_at", "2016-07-12 14:24:15.278717"], ["updated_at", "2016-07-12 14:24:15.278717"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "f1ca58f8b9a87d7270755633ef003063"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "f1ca58f8b9a87d7270755633ef003063"], ["created_at", "2016-07-12 14:24:15.281288"], ["updated_at", "2016-07-12 14:24:15.281288"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b6e974a55eab87d2c936f88593f5b418"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b6e974a55eab87d2c936f88593f5b418"], ["created_at", "2016-07-12 14:24:15.284779"], ["updated_at", "2016-07-12 14:24:15.284779"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 14:24:15.297880"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 46214 spawn> child PID = 46216 Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 14:24:15.394092"], ["id", 335514824]]  (1.0ms) commit transaction spawn> child[46216] took 0.076995 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:24:15', '2016-07-12 14:24:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:24:15', '2016-07-12 14:24:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.2ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:24:15.425939"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-12 14:24:15.433461"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (ActiveRecord: 0.6ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:24:15.439303"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:24:15.446164"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-12 14:24:15.450918"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-12 14:24:15.461578"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.8ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "18b36641f2d283bbc7046e8b151a42e5"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "18b36641f2d283bbc7046e8b151a42e5"], ["created_at", "2016-07-12 14:24:15.472807"], ["updated_at", "2016-07-12 14:24:15.472807"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.3ms | ActiveRecord: 0.5ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-12 14:24:15.503696"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.3ms | ActiveRecord: 0.5ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 46214 spawn> child PID = 46217 Fogged::Resource Load (0.7ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 14:24:15.558094"], ["id", 335514824]]  (0.8ms) commit transaction  (0.0ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 11ms (Views: 3.0ms | ActiveRecord: 1.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[46217] took 0.040417 sec  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:24:15', '2016-07-12 14:24:15', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:24:15', '2016-07-12 14:24:15', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:15', '2016-07-12 14:24:15', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:24:15', '2016-07-12 14:24:15', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 46214 spawn> child PID = 46218  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 1b507490-984c-414e-b04d-63a3940e7fbd) to Test(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-12 14:24:15.683034"], ["id", 14225656]]  (0.7ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[46218] took 0.074308 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file_inline ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 46214 spawn> child PID = 46219  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [3b734df7-601f-4e3a-bf51-09ab38986321] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [3b734df7-601f-4e3a-bf51-09ab38986321] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 1191.68ms spawn> Exception in child[46219] - OpenURI::HTTPError: 403 Forbidden spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:19:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:115:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:93:in `assert_no_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:114:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:43:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:40:in `new' /Users/david/projects/fogged/test/test_helper.rb:40:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[46219] took 1.253959 sec  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.4ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 46214 spawn> child PID = 46220  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-12 14:24:17.051741"], ["id", 1039265257]]  (0.9ms) commit transaction spawn> child[46220] took 0.065644 sec  (0.6ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 46214 spawn> child PID = 46221  (0.7ms) begin transaction  (0.1ms) commit transaction spawn> child[46221] took 0.064841 sec  (0.4ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 46214 spawn> child PID = 46222  (0.5ms) begin transaction  (0.1ms) commit transaction spawn> child[46222] took 0.064423 sec  (0.6ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 46214 spawn> child PID = 46223 spawn> child[46223] took 0.003788 sec  (0.4ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 46214 spawn> child PID = 46224  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[46224] took 0.052116 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 46214 spawn> child PID = 46225 spawn> child[46225] took 0.003891 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 46214 spawn> child PID = 46226  (0.3ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[46226] took 0.054325 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:24:17', '2016-07-12 14:24:17', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:24:17', '2016-07-12 14:24:17', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:17', '2016-07-12 14:24:17', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:17', '2016-07-12 14:24:17', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:17', '2016-07-12 14:24:17', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:17', '2016-07-12 14:24:17', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:24:17', '2016-07-12 14:24:17', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.6ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 46214 spawn> child PID = 46227 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fb9e9989-9688-4127-b9d3-17d4d87c52d8] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [fb9e9989-9688-4127-b9d3-17d4d87c52d8] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 3.1ms spawn> child[46227] took 0.031735 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 46214 spawn> child PID = 46228 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a]  (0.6ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-12 14:24:18.018491"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-12 14:24:18.462457"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a]  (0.7ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a]  (0.0ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [81badecb-cab4-4465-a794-fe9055676c4a] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 884.27ms Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[46228] took 0.915721 sec  (0.4ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-12 14:24:18', '2016-07-12 14:24:18', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-12 14:24:18', '2016-07-12 14:24:18', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:18', '2016-07-12 14:24:18', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:18', '2016-07-12 14:24:18', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:18', '2016-07-12 14:24:18', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-12 14:24:18', '2016-07-12 14:24:18', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-12 14:24:18', '2016-07-12 14:24:18', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.4ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.7ms) DELETE FROM "fogged_resources" Fixture Insert (0.4ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:37:39', '2016-07-13 05:37:39', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:37:39', '2016-07-13 05:37:39', 731805050) Fixture Delete (0.3ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 153115190) Fixture Delete (0.8ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:39', '2016-07-13 05:37:39', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:39', '2016-07-13 05:37:39', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:39', '2016-07-13 05:37:39', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:39', '2016-07-13 05:37:39', 779853880, 245026679, 431685987) Fixture Delete (0.3ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:37:39', '2016-07-13 05:37:39', 948421225)  (0.8ms) commit transaction  (0.0ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47356 spawn> child PID = 47358  (1.3ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 490c57d7-cb8b-4415-8f50-86cda458d6e7) to Test(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-13 05:37:39.489522"], ["id", 14225656]]  (0.7ms) commit transaction  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47358] took 0.110193 sec  (0.4ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file_inline ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47356 spawn> child PID = 47359  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7871f750-5b32-4c9c-9a42-ef7cc5b24da6] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [7871f750-5b32-4c9c-9a42-ef7cc5b24da6] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 1558.4ms spawn> Exception in child[47359] - OpenURI::HTTPError: 403 Forbidden spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:19:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:115:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:93:in `assert_no_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:114:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:43:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:40:in `new' /Users/david/projects/fogged/test/test_helper.rb:40:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47359] took 1.631933 sec  (0.6ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47356 spawn> child PID = 47360  (0.4ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-13 05:37:41.264487"], ["id", 1039265257]]  (0.8ms) commit transaction spawn> child[47360] took 0.091126 sec  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47356 spawn> child PID = 47361  (0.6ms) begin transaction  (0.1ms) commit transaction spawn> child[47361] took 0.077739 sec  (0.6ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47356 spawn> child PID = 47362  (0.4ms) begin transaction  (0.1ms) commit transaction spawn> child[47362] took 0.080084 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47356 spawn> child PID = 47363 spawn> child[47363] took 0.004385 sec  (0.7ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47356 spawn> child PID = 47364  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47364] took 0.05902 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47356 spawn> child PID = 47365 spawn> child[47365] took 0.004876 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47356 spawn> child PID = 47366  (0.2ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47366] took 0.059946 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:37:41', '2016-07-13 05:37:41', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:37:41', '2016-07-13 05:37:41', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:41', '2016-07-13 05:37:41', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:41', '2016-07-13 05:37:41', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:41', '2016-07-13 05:37:41', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:41', '2016-07-13 05:37:41', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:37:41', '2016-07-13 05:37:41', 948421225)  (5.3ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-13 05:37:41.755548"], ["updated_at", "2016-07-13 05:37:41.755548"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-13 05:37:41.760622"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-13 05:37:41.773416"], ["updated_at", "2016-07-13 05:37:41.773416"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-13 05:37:41.775799"], ["updated_at", "2016-07-13 05:37:41.775799"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 4ms (ActiveRecord: 0.3ms)  (0.2ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 7ms (Views: 3.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.4ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 34ms (Views: 3.1ms | ActiveRecord: 0.4ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 7ms (Views: 3.4ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ebfe182dc4d8b323f4a33d924863da6f"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "ebfe182dc4d8b323f4a33d924863da6f"], ["created_at", "2016-07-13 05:37:41.881510"], ["updated_at", "2016-07-13 05:37:41.881510"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-13 05:37:41.888467"], ["updated_at", "2016-07-13 05:37:41.888467"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 2.2ms | ActiveRecord: 0.2ms)  (0.9ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 13ms (Views: 3.6ms | ActiveRecord: 0.4ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 1ms (Views: 0.4ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.1ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-13 05:37:41.931133"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-13 05:37:41.936693"], ["updated_at", "2016-07-13 05:37:41.936693"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-13 05:37:41.942002"], ["updated_at", "2016-07-13 05:37:41.942002"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-13 05:37:41.943024"], ["updated_at", "2016-07-13 05:37:41.943024"]] SQL (0.0ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-13 05:37:41.944100"], ["updated_at", "2016-07-13 05:37:41.944100"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c9b2f93b9b58823a1b4c3a483b662548"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "c9b2f93b9b58823a1b4c3a483b662548"], ["created_at", "2016-07-13 05:37:41.951446"], ["updated_at", "2016-07-13 05:37:41.951446"]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 7ms (Views: 2.0ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 3ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.2ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47356 spawn> child PID = 47367 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c249917e-496a-4485-aaf0-b7bf9f608775] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [c249917e-496a-4485-aaf0-b7bf9f608775] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 5.21ms spawn> child[47367] took 0.03586 sec  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47356 spawn> child PID = 47368 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713]  (0.7ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-13 05:37:43.527850"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-13 05:37:43.804862"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [8e15b6f3-6242-4c44-a2e8-5219a3d67713] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 1713.4ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47368] took 1.748485 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:37:43', '2016-07-13 05:37:43', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:37:43', '2016-07-13 05:37:43', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:43', '2016-07-13 05:37:43', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:43', '2016-07-13 05:37:43', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:43', '2016-07-13 05:37:43', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:43', '2016-07-13 05:37:43', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:37:43', '2016-07-13 05:37:43', 948421225)  (0.9ms) commit transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:37:43.839561"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-13 05:37:43.844803"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 3ms (ActiveRecord: 0.5ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.7ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:37:43.849568"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:37:43.855745"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms)  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:37:43.862392"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 2ms (ActiveRecord: 0.3ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "1e444e69105ad20d921d7957322acdbb"]] SQL (0.5ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "1e444e69105ad20d921d7957322acdbb"], ["created_at", "2016-07-13 05:37:43.880466"], ["updated_at", "2016-07-13 05:37:43.880466"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "09e3111a538b30a9844c07af23e82198"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "09e3111a538b30a9844c07af23e82198"], ["created_at", "2016-07-13 05:37:43.884685"], ["updated_at", "2016-07-13 05:37:43.884685"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.5ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ea5cdbed01947b29800152f96605835b"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "ea5cdbed01947b29800152f96605835b"], ["created_at", "2016-07-13 05:37:43.889781"], ["updated_at", "2016-07-13 05:37:43.889781"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "2266745b0f9e679510e30467df922b58"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "2266745b0f9e679510e30467df922b58"], ["created_at", "2016-07-13 05:37:43.892537"], ["updated_at", "2016-07-13 05:37:43.892537"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "a1a82a5e69eb624f7a09243ec9b1d5e5"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "a1a82a5e69eb624f7a09243ec9b1d5e5"], ["created_at", "2016-07-13 05:37:43.896423"], ["updated_at", "2016-07-13 05:37:43.896423"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-13 05:37:43.903352"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47356 spawn> child PID = 47372 Fogged::Resource Load (0.6ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-13 05:37:43.997258"], ["id", 335514824]]  (0.6ms) commit transaction spawn> child[47372] took 0.072158 sec  (0.5ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 1039265257) Fixture Insert (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:37:44', '2016-07-13 05:37:44', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:37:44', '2016-07-13 05:37:44', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:44', '2016-07-13 05:37:44', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:44', '2016-07-13 05:37:44', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:44', '2016-07-13 05:37:44', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:37:44', '2016-07-13 05:37:44', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:37:44', '2016-07-13 05:37:44', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-13 05:37:44.031972"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.5ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.5ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-13 05:37:44.044998"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 6ms (Views: 1.0ms | ActiveRecord: 1.0ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47356 spawn> child PID = 47373 Fogged::Resource Load (0.9ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.7ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-13 05:37:44.106147"], ["id", 335514824]]  (0.8ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 14ms (Views: 2.8ms | ActiveRecord: 1.9ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47373] took 0.0517 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:38:47', '2016-07-13 05:38:47', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:38:47', '2016-07-13 05:38:47', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:47', '2016-07-13 05:38:47', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:47', '2016-07-13 05:38:47', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:47', '2016-07-13 05:38:47', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:47', '2016-07-13 05:38:47', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:38:47', '2016-07-13 05:38:47', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerCreateTest: test_should_create_resource ------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "7c2194f98d8714eda50ba41f0ecb2d77"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "content_type", "extension", "uploading", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["name", "Dummy"], ["content_type", "image/png"], ["extension", "png"], ["uploading", "t"], ["token", "7c2194f98d8714eda50ba41f0ecb2d77"], ["created_at", "2016-07-13 05:38:47.364056"], ["updated_at", "2016-07-13 05:38:47.364056"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 27ms (Views: 2.1ms | ActiveRecord: 0.8ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" ORDER BY "fogged_resources"."id" DESC LIMIT 1  (0.5ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_with_invalid_filename --------------------------------------------------------------------------------------------  (0.2ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"bar", "content_type"=>"image/png"}}  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 7ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_content_type -------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "filename"=>"dummy.png", "content_type"=>""}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_filename ---------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"Dummy", "content_type"=>"image/png"}} Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ----------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_name -----------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Parameters: {"resource"=>{"name"=>"", "filename"=>"dummy.png", "content_type"=>"image/png"}}  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1 Completed 422 Unprocessable Entity in 2ms (ActiveRecord: 0.1ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerCreateTest: test_should_not_create_resource_without_resource_parameter -------------------------------------------------------------------------------------------------  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#create as HTML Completed 400 Bad Request in 0ms (ActiveRecord: 0.0ms)  (0.0ms) SELECT COUNT(*) FROM "fogged_resources"  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification ---------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:38:47.403079"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "width" = ?, "height" = ?, "duration" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["width", 640], ["height", 480], ["duration", 85], ["updated_at", "2016-07-13 05:38:47.407429"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 2ms (ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.5ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_failed_job -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:38:47.412695"], ["id", 1039265257]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"failed"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 1ms (ActiveRecord: 0.1ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_id -------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:38:47.419037"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"foobar!", "state"=>"finished"}, "outputs"=>[{"duration_in_ms"=>"85600", "height"=>"480", "width"=>"640"}]} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "foobar!"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms)  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------------------------- Fogged::ResourcesControllerZencoderNotificationTest: test_should_receive_zencoder_notification_with_invalid_payload ------------------------------------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.1ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234565434567890"], ["updated_at", "2016-07-13 05:38:47.424023"], ["id", 1039265257]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#zencoder_notification as HTML Parameters: {"job"=>{"id"=>"1234565434567890", "state"=>"finished"}} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."encoding_job_id" = ? LIMIT 1 [["encoding_job_id", "1234565434567890"]] Completed 200 OK in 0ms (ActiveRecord: 0.0ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]]  (0.3ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_not_show_resource_with_invalid_id ---------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_image_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_resource -------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"701625837"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Completed 200 OK in 2ms (Views: 1.2ms | ActiveRecord: 0.0ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerShowTest: test_should_show_video_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#show as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Completed 200 OK in 1ms (Views: 1.1ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------- FoggedTest: test_should_check_if_file_exists --------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_directory_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- FoggedTest: test_should_return_resources_public_url ---------------------------------------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ---------------------- FoggedTest: test_truth ----------------------  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------ Fogged::Resources::AWSThumbnailJobTest: test_should_not_thumbnail_with_unknown_image ------------------------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47399 spawn> child PID = 47401 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [34c9e97b-6c05-40ed-a31a-ea3581202af3] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [34c9e97b-6c05-40ed-a31a-ea3581202af3] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 5.44ms spawn> child[47401] took 0.039592 sec  (0.5ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSThumbnailJobTest: test_should_thumbnail_the_image ----------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> parent PID = 47399 spawn> child PID = 47402 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/731805050 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3]  (0.9ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3] SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 50], ["updated_at", "2016-07-13 05:38:49.273583"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3]  (0.9ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3]  (0.1ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3] SQL (0.3ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 100], ["updated_at", "2016-07-13 05:38:49.540914"], ["id", 731805050]] [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3]  (0.8ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3]  (0.2ms) begin transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3]  (0.1ms) commit transaction [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [805d55b7-8f79-4486-848c-a345e0301ce3] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 1975.54ms Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 731805050]] spawn> child[47402] took 2.014454 sec  (0.3ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:38:49', '2016-07-13 05:38:49', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:38:49', '2016-07-13 05:38:49', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:49', '2016-07-13 05:38:49', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:49', '2016-07-13 05:38:49', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:49', '2016-07-13 05:38:49', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:49', '2016-07-13 05:38:49', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.0ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:38:49', '2016-07-13 05:38:49', 948421225)  (1.1ms) commit transaction  (0.1ms) begin transaction ------------------------------------------------------------- MovieTest: test_should_not_save_movie_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 431685987]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-13 05:38:49.612415"], ["id", 431685987]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction --------------------------------------------------- MovieTest: test_should_save_movie_with_no_resources ---------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-13 05:38:49.619243"], ["updated_at", "2016-07-13 05:38:49.619243"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- MovieTest: test_should_save_movie_with_several_resources -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 819504217]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "movies" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-13 05:38:49.625725"], ["updated_at", "2016-07-13 05:38:49.625725"]] SQL (0.2ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 701625837], ["movie_id", 948421228], ["created_at", "2016-07-13 05:38:49.627024"], ["updated_at", "2016-07-13 05:38:49.627024"]] SQL (0.1ms) INSERT INTO "movie_fogged_resources" ("resource_id", "movie_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["resource_id", 819504217], ["movie_id", 948421228], ["created_at", "2016-07-13 05:38:49.628190"], ["updated_at", "2016-07-13 05:38:49.628190"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file ---------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47399 spawn> child PID = 47407  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] Enqueued Fogged::Resources::AWSThumbnailJob (Job ID: 40e851f5-d8db-4b36-bd8b-6943898128c8) to Test(default) with arguments: gid://dummy/Fogged::Resource/14225656  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_progress", 0], ["updated_at", "2016-07-13 05:38:49.747614"], ["id", 14225656]]  (0.8ms) commit transaction  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47407] took 0.103752 sec  (0.6ms) begin transaction ----------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_image_file_inline ----------------------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 14225656]] spawn> parent PID = 47399 spawn> child PID = 47408  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46b0486d-e19f-4689-97b4-7c005141aaad] Performing Fogged::Resources::AWSThumbnailJob from Test(default) with arguments: gid://dummy/Fogged::Resource/14225656 [ActiveJob] [Fogged::Resources::AWSThumbnailJob] [46b0486d-e19f-4689-97b4-7c005141aaad] Performed Fogged::Resources::AWSThumbnailJob from Test(default) in 1554.69ms spawn> Exception in child[47408] - OpenURI::HTTPError: 403 Forbidden spawn> /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:358:in `open_http' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `catch' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:716:in `open' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/open-uri.rb:34:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:13:in `block (3 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:12:in `block (2 levels) in perform' /Users/david/.rubies/ruby-2.2.2/lib/ruby/2.2.0/tempfile.rb:319:in `open' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:11:in `block in perform' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `each_with_index' /Users/david/projects/fogged/app/jobs/fogged/resources/aws_thumbnail_job.rb:10:in `perform' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:32:in `block in perform_now' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:117:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:498:in `block (2 levels) in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:343:in `block (2 levels) in simple' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `call' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:23:in `block (4 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `block in instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/notifications.rb:164:in `instrument' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:22:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `block in tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:43:in `tag_logger' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/logging.rb:19:in `block (2 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `instance_exec' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:441:in `block in make_lambda' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:342:in `block in simple' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:497:in `block in around' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:505:in `call' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:92:in `_run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:776:in `_run_perform_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:31:in `perform_now' /Users/david/.gem/ruby/2.2.2/gems/activejob-4.2.1/lib/active_job/execution.rb:16:in `perform_now' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:19:in `encode_image' /Users/david/projects/fogged/app/models/fogged/resources/aws_encoder.rb:10:in `encode!' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:115:in `block (3 levels) in ' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:71:in `assert_difference' /Users/david/.gem/ruby/2.2.2/gems/activesupport-4.2.1/lib/active_support/testing/assertions.rb:93:in `assert_no_difference' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:114:in `block (2 levels) in ' /Users/david/projects/fogged/test/test_helper.rb:43:in `block in in_a_fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:184:in `block in fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:160:in `fork_it' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:122:in `run' /Users/david/.gem/ruby/2.2.2/gems/spawnling-2.1.6/lib/spawnling.rb:102:in `initialize' /Users/david/projects/fogged/test/test_helper.rb:40:in `new' /Users/david/projects/fogged/test/test_helper.rb:40:in `in_a_fork' /Users/david/projects/fogged/test/models/fogged/resources/aws_encoder_test.rb:107:in `block in ' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:108:in `block (3 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:206:in `capture_exceptions' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:105:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:258:in `time_it' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:104:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:278:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest/test.rb:103:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-reporters-1.0.11/lib/minitest/reporters.rb:43:in `run_with_hooks' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:774:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:301:in `run_one_method' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:289:in `block (2 levels) in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `each' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:288:in `block in run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:327:in `on_signal' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:314:in `with_info_handler' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:287:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `block in __run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `map' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:150:in `__run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:127:in `run' /Users/david/.gem/ruby/2.2.2/gems/minitest-5.5.1/lib/minitest.rb:56:in `block in autorun' spawn> child[47408] took 1.634176 sec  (0.5ms) begin transaction ---------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_file ---------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47399 spawn> child PID = 47409  (0.5ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-13 05:38:51.517708"], ["id", 1039265257]]  (4.8ms) commit transaction spawn> child[47409] took 0.076706 sec  (0.5ms) begin transaction ----------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_additional_outputs ----------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47399 spawn> child PID = 47410  (0.4ms) begin transaction  (0.2ms) commit transaction spawn> child[47410] took 0.075531 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------------ Fogged::Resources::AWSEncoderTest: test_should_encode_video_with_zencoder_notification_url ------------------------------------------------------------------------------------------ Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1039265257]] spawn> parent PID = 47399 spawn> child PID = 47411  (0.6ms) begin transaction  (0.1ms) commit transaction spawn> child[47411] took 0.061793 sec  (0.4ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] spawn> parent PID = 47399 spawn> child PID = 47412 spawn> child[47412] took 0.005219 sec  (0.5ms) begin transaction --------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_image_file_without_minimagick --------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 937304175]] spawn> parent PID = 47399 spawn> child PID = 47413  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47413] took 0.049474 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_delayed_job ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> parent PID = 47399 spawn> child PID = 47414 spawn> child[47414] took 0.005334 sec  (0.5ms) begin transaction ------------------------------------------------------------------------------------- Fogged::Resources::AWSEncoderTest: test_should_not_encode_video_file_without_zencoder ------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 183950720]] spawn> parent PID = 47399 spawn> child PID = 47415  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs"  (0.1ms) SELECT COUNT(*) FROM "delayed_jobs" spawn> child[47415] took 0.063724 sec  (0.4ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:38:51', '2016-07-13 05:38:51', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:38:51', '2016-07-13 05:38:51', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.2ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:51', '2016-07-13 05:38:51', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:51', '2016-07-13 05:38:51', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:51', '2016-07-13 05:38:51', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:51', '2016-07-13 05:38:51', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:38:51', '2016-07-13 05:38:51', 948421225)  (5.2ms) commit transaction  (0.1ms) begin transaction --------------------------------------------------- Fogged::ResourceTest: test_resource_should_be_valid ---------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "426f664dd597ed3b5cdcf2e89e620a3f"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "426f664dd597ed3b5cdcf2e89e620a3f"], ["created_at", "2016-07-13 05:38:51.968280"], ["updated_at", "2016-07-13 05:38:51.968280"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_destroy_fogged_file_after_destroy ----------------------------------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "56a200fa4bde588a8b5f7f2aa7ed1010"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "56a200fa4bde588a8b5f7f2aa7ed1010"], ["created_at", "2016-07-13 05:38:51.972396"], ["updated_at", "2016-07-13 05:38:51.972396"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.1ms) SAVEPOINT active_record_1 SQL (0.4ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 1039265265]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.6ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_a_token_after_being_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "4d40f995b5e05791e85344783282c365"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "4d40f995b5e05791e85344783282c365"], ["created_at", "2016-07-13 05:38:51.978731"], ["updated_at", "2016-07-13 05:38:51.978731"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------- Fogged::ResourceTest: test_resource_should_have_an_upload_url -------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "c5655cf1240678cb4b29fb62d73ea028"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "c5655cf1240678cb4b29fb62d73ea028"], ["created_at", "2016-07-13 05:38:51.981867"], ["updated_at", "2016-07-13 05:38:51.981867"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------ Fogged::ResourceTest: test_resource_should_have_an_url ------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "b3b802dd2c4081a154f1e6396352c338"]] SQL (0.2ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["extension", "txt"], ["uploading", "f"], ["content_type", "text/plain"], ["name", "Test"], ["token", "b3b802dd2c4081a154f1e6396352c338"], ["created_at", "2016-07-13 05:38:51.986356"], ["updated_at", "2016-07-13 05:38:51.986356"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.0ms) begin transaction ---------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_content_type_should_not_be_saved ----------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.1ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------- Fogged::ResourceTest: test_resource_without_extension_should_not_be_saved -------------------------------------------------------------------------  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.0ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_image -------------------------------------------------------- Fogged::Resource Load (0.3ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-13 05:38:51.994095"], ["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.4ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------- Fogged::ResourceTest: test_should_process_resource_video -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------------ Fogged::ResourceTest: test_should_process_resource_video_with_zencoder_enabled ------------------------------------------------------------------------------ spawn> parent PID = 47399 spawn> child PID = 47416 Fogged::Resource Load (0.5ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) begin transaction SQL (0.4ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-13 05:38:52.089042"], ["id", 335514824]]  (0.7ms) commit transaction spawn> child[47416] took 0.075723 sec  (0.5ms) begin transaction Fixture Delete (0.3ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:38:52', '2016-07-13 05:38:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:38:52', '2016-07-13 05:38:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 579229346) Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 948421225)  (1.0ms) commit transaction  (0.0ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_confirm_resource -------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "width" = ?, "height" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["width", 800], ["height", 600], ["updated_at", "2016-07-13 05:38:52.122566"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 5ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.4ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------------------------ Fogged::ResourcesControllerConfirmTest: test_should_confirm_video_resource_with_zencoder_enabled ------------------------------------------------------------------------------------------------ spawn> parent PID = 47399 spawn> child PID = 47417 Fogged::Resource Load (0.8ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"335514824"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.2ms) begin transaction SQL (0.5ms) UPDATE "fogged_resources" SET "encoding_job_id" = ?, "encoding_progress" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["encoding_job_id", "1234567890"], ["encoding_progress", 0], ["updated_at", "2016-07-13 05:38:52.181070"], ["id", 335514824]]  (0.9ms) commit transaction  (0.1ms) begin transaction  (0.0ms) commit transaction Completed 200 OK in 13ms (Views: 3.1ms | ActiveRecord: 1.8ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]] spawn> child[47417] took 0.046231 sec  (0.5ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerConfirmTest: test_should_not_confirm_resource_with_invalid_id ---------------------------------------------------------------------------------------- Processing by Fogged::ResourcesController#confirm as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 1ms (ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction Fixture Delete (0.2ms) DELETE FROM "fogged_resources" Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 0', 'qwertzuiop0', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 517391740) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 1', 'qwertzuiop1', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 701625837) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 2', 'qwertzuiop2', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 819504217) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 3', 'qwertzuiop3', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 132093124) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('txt', 'f', 'text/plain', 'resource text 4', 'qwertzuiop4', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 431685987) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 0', 'mov0', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 620280917) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', 'mov1', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 335514824) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 2', 'mov2', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 183950720) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 3', 'mov3', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 1039265257) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 4', 'mov4', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 596998220) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 0', 'png0', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 433078596) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 1', 'png1', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 785871319) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 2', 'png2', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 937304175) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 3', 'png3', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 14225656) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png 4', 'png4', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 515736925) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_job_id", "encoding_progress", "created_at", "updated_at", "id") VALUES ('mov', 'f', 'video/quicktime', 'resource mov 1', '1234567890mov', '1234567890', 10, '2016-07-13 05:38:52', '2016-07-13 05:38:52', 538821867) Fixture Insert (0.1ms) INSERT INTO "fogged_resources" ("extension", "uploading", "content_type", "name", "token", "encoding_progress", "created_at", "updated_at", "id") VALUES ('png', 'f', 'image/png', 'resource png thumbnail', 'pngthumbnail', 0, '2016-07-13 05:38:52', '2016-07-13 05:38:52', 731805050) Fixture Delete (0.1ms) DELETE FROM "images" Fixture Insert (0.1ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image one', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 579229346) Fixture Insert (0.0ms) INSERT INTO "images" ("name", "created_at", "updated_at", "id") VALUES ('image two', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 153115190) Fixture Delete (0.1ms) DELETE FROM "movie_fogged_resources" Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 419883833, 624739301, 701625837) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 849405871, 624739301, 819504217) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 98413728, 245026679, 784085492) Fixture Insert (0.1ms) INSERT INTO "movie_fogged_resources" ("created_at", "updated_at", "id", "movie_id", "resource_id") VALUES ('2016-07-13 05:38:52', '2016-07-13 05:38:52', 779853880, 245026679, 431685987) Fixture Delete (0.1ms) DELETE FROM "movies" Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie one', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 624739301) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie two', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 245026679) Fixture Insert (0.1ms) INSERT INTO "movies" ("name", "created_at", "updated_at", "id") VALUES ('Movie three', '2016-07-13 05:38:52', '2016-07-13 05:38:52', 948421225)  (1.1ms) commit transaction  (0.0ms) begin transaction ------------------------------------------------------- Fogged::Resources::EncoderTest: test_should_aws_encoder ------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 335514824]]  (0.1ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------------------------- Fogged::ResourcesControllerUpdateTest: test_should_not_update_resource_with_invalid_id -------------------------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"1234567890"} Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 1234567890]] Completed 404 Not Found in 1ms (ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------ Fogged::ResourcesControllerUpdateTest: test_should_update_resource ------------------------------------------------------------------ Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]] Processing by Fogged::ResourcesController#update as HTML Parameters: {"resource"=>{"name"=>"Update"}, "id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) UPDATE "fogged_resources" SET "name" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["name", "Update"], ["updated_at", "2016-07-13 05:38:52.233160"], ["id", 785871319]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Completed 200 OK in 4ms (Views: 1.4ms | ActiveRecord: 0.4ms) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.6ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_destroy_resource -------------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"785871319"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) DELETE FROM "fogged_resources" WHERE "fogged_resources"."id" = ? [["id", 785871319]]  (0.1ms) RELEASE SAVEPOINT active_record_1 Completed 204 No Content in 3ms (ActiveRecord: 0.5ms)  (0.2ms) SELECT COUNT(*) FROM "fogged_resources"  (0.5ms) rollback transaction  (0.1ms) begin transaction ---------------------------------------------------------------------------------------- Fogged::ResourcesControllerDestroyTest: test_should_not_destroy_resource_with_invalid_id ---------------------------------------------------------------------------------------- Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SELECT COUNT(*) FROM "fogged_resources" Processing by Fogged::ResourcesController#destroy as HTML Parameters: {"id"=>"123456"} Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 123456]] Completed 404 Not Found in 0ms (ActiveRecord: 0.0ms)  (0.1ms) SELECT COUNT(*) FROM "fogged_resources"  (0.1ms) rollback transaction  (0.1ms) begin transaction ------------------------------------------------------------------------ ResourcesControllerIndexTest: test_should_index_all_resources_for_movies ------------------------------------------------------------------------ Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]] Completed 200 OK in 12ms (Views: 3.2ms | ActiveRecord: 0.3ms) Movie Load (0.1ms) SELECT "movies".* FROM "movies" Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 948421225]]  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie --------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.8ms | ActiveRecord: 0.3ms) Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]]  (0.1ms) rollback transaction  (0.1ms) begin transaction ----------------------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_a_movie_with_search_query_on_name ----------------------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]]  (0.1ms) SAVEPOINT active_record_1 Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."token" = ? LIMIT 1 [["token", "ff22704b4fe932789f073d1dec0d38ce"]] SQL (0.3ms) INSERT INTO "fogged_resources" ("name", "extension", "content_type", "token", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?, ?) [["name", "footest barish"], ["extension", "txt"], ["content_type", "text/plain"], ["token", "ff22704b4fe932789f073d1dec0d38ce"], ["created_at", "2016-07-13 05:38:52.286148"], ["updated_at", "2016-07-13 05:38:52.286148"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "movie_fogged_resources" ("movie_id", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["movie_id", 624739301], ["resource_id", 1039265265], ["created_at", "2016-07-13 05:38:52.289240"], ["updated_at", "2016-07-13 05:38:52.289240"]]  (0.0ms) RELEASE SAVEPOINT active_record_1 Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"624739301", "query"=>"test"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 624739301 Fogged::Resource Load (0.2ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? AND (fogged_resources.name LIKE '%test%') [["movie_id", 624739301]] Completed 200 OK in 4ms (Views: 1.6ms | ActiveRecord: 0.2ms)  (0.8ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_for_movies -------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Movie Load (0.0ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 245026679]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_ids"=>["624739301", "245026679"]} Movie Load (0.2ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" IN (624739301, 245026679) Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 245026679]] Fogged::Resource Load (0.0ms) SELECT "fogged_resources".* FROM "fogged_resources" INNER JOIN "movie_fogged_resources" ON "fogged_resources"."id" = "movie_fogged_resources"."resource_id" WHERE "movie_fogged_resources"."movie_id" = ? [["movie_id", 624739301]] Completed 200 OK in 5ms (Views: 2.8ms | ActiveRecord: 0.2ms)  (0.1ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------------------------- ResourcesControllerIndexTest: test_should_index_resources_with_invalid_movie_id ------------------------------------------------------------------------------- Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = ? LIMIT 1 [["id", 624739301]] Processing by Fogged::ResourcesController#index as HTML Parameters: {"type"=>"movie", "type_id"=>"1234567890"} Movie Load (0.1ms) SELECT "movies".* FROM "movies" WHERE "movies"."id" = 1234567890 Completed 200 OK in 2ms (Views: 0.5ms | ActiveRecord: 0.1ms)  (0.1ms) rollback transaction  (0.1ms) begin transaction --------------------------------------------------- ImageTest: test_image_url_changing_the_storage_name --------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 785871319]]  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 785871319], ["created_at", "2016-07-13 05:38:52.319511"], ["updated_at", "2016-07-13 05:38:52.319511"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction ------------------------------------------------------------- ImageTest: test_should_not_save_image_with_uploading_resource ------------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) UPDATE "fogged_resources" SET "uploading" = ?, "updated_at" = ? WHERE "fogged_resources"."id" = ? [["uploading", "t"], ["updated_at", "2016-07-13 05:38:52.323482"], ["id", 701625837]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.0ms) SAVEPOINT active_record_1  (0.0ms) ROLLBACK TO SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.0ms) begin transaction -------------------------------------------------------- ImageTest: test_should_save_image_with_uploaded_resource -------------------------------------------------------- Fogged::Resource Load (0.1ms) SELECT "fogged_resources".* FROM "fogged_resources" WHERE "fogged_resources"."id" = ? LIMIT 1 [["id", 701625837]]  (0.0ms) SAVEPOINT active_record_1 SQL (0.2ms) INSERT INTO "images" ("name", "resource_id", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "test"], ["resource_id", 701625837], ["created_at", "2016-07-13 05:38:52.327271"], ["updated_at", "2016-07-13 05:38:52.327271"]]  (0.1ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction  (0.1ms) begin transaction -------------------------------------------------- ImageTest: test_should_save_image_without_resource --------------------------------------------------  (0.1ms) SAVEPOINT active_record_1 SQL (0.3ms) INSERT INTO "images" ("name", "created_at", "updated_at") VALUES (?, ?, ?) [["name", "test"], ["created_at", "2016-07-13 05:38:52.329517"], ["updated_at", "2016-07-13 05:38:52.329517"]]  (0.0ms) RELEASE SAVEPOINT active_record_1  (0.3ms) rollback transaction